Skip to main content
Glama

composer_edit_file

Destructive

Replaces exact text in a project file. old_string must occur exactly once unless replace_all is true.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYesPath relative to the project, e.g. gen/shot1.mp4.
new_stringYesReplacement text, different from old_string.
old_stringYesExact text to replace, without read_file's line-number prefix; whitespace must match. It must occur once unless replace_all is set.
project_idYesproject_id from composer_project_create.
replace_allNoReplace every occurrence of old_string.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

B3.4/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=false, destructiveHint=true and openWorldHint=false, so the mutation risk is covered structurally. The description adds a genuinely useful behavioral rule (old_string must match exactly once unless replace_all is set), but says nothing about failure behavior, whether the file must already exist, or whitespace/encoding handling.

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

Conciseness5/5

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

Two short sentences, zero filler, and the core replacement behavior plus its key constraint are both front-loaded. Nothing can be removed without losing information.

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

Completeness4/5

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

For a destructive edit tool with full schema coverage and annotations carrying the safety profile, the description supplies the one gotcha an agent most needs (single-occurrence matching). It is nearly complete, with only error/edge-case behavior left implicit.

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 description coverage is 100% and every parameter, including replace_all and the uniqueness constraint on old_string, is already documented in the schema. The description repeats that constraint rather than adding new semantics such as format, encoding, or size limits.

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?

States a specific verb and resource ('Replaces exact text in a project file'), which distinguishes it from a whole-file operation. It does not name the nearest siblings (composer_write_file, composer_read_file) to route the agent explicitly, so it falls short of a 5.

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

Usage Guidelines2/5

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

There is no guidance on when to choose this over composer_write_file or how it relates to composer_read_file, which the schema itself references. The uniqueness rule is an operational constraint, not a when-to-use instruction, so the agent must infer the routing.

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