Skip to content
Changelog

editor.media.add

Adds a Library item or a file to the open project, on the timeline or only into its media.

JSON-RPC 2.0project.write

The file is read in the background, so the answer comes at once. Without at_ms, it goes at the end of the main track. Without a project open, a new one is made.

Parameters

  • itemstringA Library item's id or title.
  • filestringA file's path, instead of item.
  • at_msnumberA moment on the canvas's timeline. Default: the playhead.
  • tracknumberA track's index.
  • keepbooleanOnly into the media, not on the timeline.
  • canvasstringA canvas's id or name, shown first. Default: the canvas shown.

Result

  • addingstringThe item's title or the file's path.

Errors

Invalid params (-32602) without item or file. Not found (-32004) for a file or Library item that isn't there.

Events

Subscribers to events get editor.changed.

From an AI agent

The MCP server's editor_media (action: add) reaches this method.

Example

ws://localhost:4455/rpc
{
"jsonrpc": "2.0",
"id": 1,
"method": "editor.media.add",
"params": {
"file": "/Users/sam/Movies/intro.mp4",
"keep": true
}
}

Result

{ "adding": "/Users/sam/Movies/intro.mp4" }

editor.media.list · editor.clip.add