Skip to main content
Glama

Replace the film

replace_film
DestructiveIdempotent

Replace 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

NameRequiredDescriptionDefault
pathYesThe 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.
branchIdYesVersion id from list_branches to write to, without switching the editor to it. null, or leaving it out, means the current version.
documentYes
projectIdYesThe 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.
waitForAssetsYesSeconds 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.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / waitForAssets / description
      Previous value: -"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. An asset still being analyzed is placeable and never waited for."New value: +"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."
  2. Changed3 schema fields changed
    • addedInput schema / properties / path
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "description": "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."
      +}
    • addedInput schema / properties / waitForAssets
      Added value: +{
      +  "anyOf": [
      +    {
      +      "maximum": 9007199254740991,
      +      "minimum": -9007199254740991,
      +      "type": "integer"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "description": "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. An asset still being analyzed is placeable and never waited for."
      +}
    • changedInput schema / required
      Previous value: -[
      -  "document",
      -  "branchId",
      -  "projectId"
      -]New value: +[
      +  "document",
      +  "path",
      +  "branchId",
      +  "waitForAssets",
      +  "projectId"
      +]
  3. First observed

TDQS

A4.3/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Beyond the destructive/readOnly annotations, the description discloses the full write contract: compile-time validation against main.film, automatic repairs with a named report, nothing written when compilation fails, version-scoped writes that do not switch the editor, and the waitForAssets blocking/refusal path. That is exactly the behavioral context annotations cannot convey.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The purpose, compile-failure rule and repair rule are front-loaded, and each sentence carries operative information. It is nonetheless a dense block: the skill-id enumeration and the inline module/import example could be compressed or deferred to read_docs without losing guidance.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a destructive full-document write with five parameters and no output schema, the description covers the failure modes (non-compiling write refused, unplaceable asset refused with the fixing call), the repair semantics and the report, and where to obtain skills. An agent could invoke this correctly without opening another tool.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 80%, so 3 is the floor; the description clears it by giving meaning to the undescribed `document` parameter – what valid film XML looks like, the module root shape, and the explicit 'Film is XML, not TypeScript or JSX' warning. `path`, `branchId` and `waitForAssets` are restated rather than extended, but the document guidance is real added value.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The opening sentence states a specific verb and resource: replace the complete main.film XML document (or a module's). The word 'complete' distinguishes it from an incremental edit, but the closest sibling, patch_film, is never named, so the agent must infer the split rather than being told.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Strong preconditions are spelled out: read the film first, read the covering skill with read_docs before the first write that uses a feature, and use list_branches/list_files for ids and module names. The one gap is explicit routing against patch_film / fix_film – the text alludes to 'a patch' without saying when to choose it over this tool.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.