Skip to main content
Glama

Edit a film file

edit_file
Destructive

Replaces one exact piece of text in a film file (it must occur exactly once) and compiles the film.

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": {
      "video": "<video>",
      "path": "<path>",
      "find": "<find>",
      "replace": "<replace>"
    },
    "name": "edit_file"
  }
}

Input Schema

NameRequiredDescriptionDefault
findYesThe exact text to replace; must occur once in the file
pathYesThe film file, e.g. film/Main.tsx
videoYesThe video's id, from start_video
replaceYesWhat to put in its place

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / properties / path / description
      Added value: +"The film file, e.g. film/Main.tsx"
  2. First observed

TDQS

B3.4/5.0
Behavior3/5

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

Beyond the annotations (readOnlyHint=false, destructiveHint=true), the description discloses two real behaviors: the find text must occur exactly once, and the call triggers a compile. It does not say what happens when the match is zero or multiple, or whether the file stays modified if the compile fails — meaningful gaps for a destructive tool.

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?

A single front-loaded sentence with no filler; the constraint is parenthetical and the compile side effect is placed last where it belongs. Slightly dense but nothing wasted.

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

Completeness3/5

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

It covers the core action and constraint for a four-parameter destructive edit, which is reasonable given full schema coverage and no output schema. However, failure semantics (non-unique match, compile error, partial write) are unaddressed and matter for a tool flagged destructive.

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

Parameters3/5

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

Schema coverage is 100%, so the baseline is 3. The description only restates the 'must occur once' constraint already documented on the `find` parameter and adds nothing about `video`, `path`, or `replace` beyond the schema.

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 description names a specific verb ("Replaces") and resource ("one exact piece of text in a film file") and adds the side effect that the film is compiled, which separates it from a plain file writer like write_file. It stops short of explicitly contrasting itself with any named sibling.

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

Usage Guidelines3/5

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

Usage is implied rather than stated: the single-occurrence constraint tells an agent this is for surgical, unique-match edits, not bulk rewrites. There is no explicit when-to-use/when-not guidance and no pointer to alternatives such as write_file for full-file rewrites.

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.

Resources