Replace the film
replace_filmReplace the complete main.film XML document, or with path a module's. Read it first and preserve existing content. path null (or left out) writes main.film; a file name such as "brand.film" writes that module, created when it is new. A module has a root with , and elements and no tracks; main.film imports it with , then places <brand.LowerThird/> and reads {brand.accent}. Every write compiles main.film with every module, so a module write that breaks main.film is refused like any other. A write repairs the mistakes it can fix with certainty, such as a misspelled name, a missing close tag, duration="5s" or a clip longer than its media, and names each repair in its report. A write that still does not compile writes nothing. branchId null (or left out) means the current version; a version id from list_branches writes that version without switching the editor to it. Skills: before the first write that uses something, read the skills that cover it with read_docs, one id a call: builtin-film-language for any film write; builtin-film-tracks for clips/tracks; builtin-color-grading for grades; builtin-keyframes for keyframes; builtin-screen-recordings for zoom/recording settings; builtin-3d for a 3D model clip or a 3D and its clips; builtin-object-tracking for follow; builtin-track-pointing for aim; builtin-data-files for a ; builtin-film-modules for a module or an ; builtin-sound-effects for sound effect tags (, , , ...); builtin-groups for a . A skill read once stays in the conversation: never read it again. A patch that only changes values the film already has (a text, a time, a colour, a volume) needs no skill. Bind assets with and play with ref. Use ids from asset/component tools. An asset is placeable once its file is encoded and its size is known. When the write places an asset that is not placeable yet (a generation still being imported, a video still encoding), it waits for it up to waitForAssets seconds (null: 30), then writes; one still not placeable is refused with what it lacks and the call that fixes it. Film is XML, not TypeScript or JSX.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"document": "<document>",
"path": "<path>",
"branchId": "<branchId>",
"waitForAssets": "<waitForAssets>",
"projectId": "<projectId>"
},
"name": "replace_film"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | The film file: null for main.film, or a module file name such as "brand.film" (letters, digits, - and _ before .film, no folders). list_files lists them. | |
| branchId | Yes | Version id from list_branches to write to, without switching the editor to it. null, or leaving it out, means the current version. | |
| document | Yes | ||
| projectId | Yes | The project this call runs on without changing the open project. null (or leaving it out) uses the open project. wait_for_jobs takes the projectId of the calls that started the jobs. | |
| waitForAssets | Yes | Seconds to wait inside this write for an asset it places that is not placeable yet (a generation still being imported, a video still encoding), 0 to 40. null waits up to 30. 0 never waits: such a write is refused with what is missing. |