Skip to main content
Glama

Edit the film

patch_film

Apply one or more exact replacements to main.film, or with path to a module, in one compile. Each replacement needs find, replace, all (false for a unique match). Empty replace deletes the span. Put every change you know of into one call with all its replacements, not one call per change, and do not read the film again after a patch: its answer shows what changed. 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": {
      "replacements": "<replacements>",
      "path": "<path>",
      "branchId": "<branchId>",
      "waitForAssets": "<waitForAssets>",
      "projectId": "<projectId>"
    },
    "name": "patch_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.
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.
replacementsYes
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: -[
      -  "replacements",
      -  "branchId",
      -  "projectId"
      -]New value: +[
      +  "replacements",
      +  "path",
      +  "branchId",
      +  "waitForAssets",
      +  "projectId"
      +]
  3. First observed

TDQS

A4.8/5.0
Behavior5/5

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

Goes well beyond the annotations: it discloses that writes auto-repair certain mistakes and name each repair, that a non-compiling write writes nothing, that module writes are validated against main.film, and that asset placement can block up to waitForAssets seconds before refusing. These are exactly the mutation behaviors an agent needs and none are in the annotations.

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 core instruction and the batching rule are front-loaded, and the module/skill/asset details follow in a logical order. It is long, and the module XML primer plus the full skills enumeration are dense, but for a tool this complex nearly every sentence carries operational weight.

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 five-parameter mutation tool with no output schema, the description covers the write semantics, failure modes, asset-wait behavior, module model, and skill prerequisites, and it notes that the response reports what changed. Nothing an agent needs to call it correctly appears to be missing.

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 the schema already documents most parameters, but the description adds real meaning: path null means main.film and a new module file is created on write, branchId writes a version without switching the editor, and waitForAssets defaults to 30. It does not restate the find/replace/all semantics, which the schema already covers.

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

Purpose5/5

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

States a specific verb and resource ('Apply one or more exact replacements to main.film, or with path to a module, in one compile') and implicitly distinguishes itself from replace_film/fix_film by being a targeted find/replace patch. An agent can tell what it does without opening the schema.

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

Usage Guidelines5/5

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

Explicitly says to batch all changes into one call rather than one call per change, forbids re-reading the film after a patch, and gives a clear rule for when a skill read is required versus when a value-only patch needs none. It also names the sibling tools to use for ids (asset/component tools, list_files, list_branches).

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.