Skip to main content
Glama
isina-nej
by isina-nej

Edit file

edit_file
Idempotent

Replace exact file content with new text, using dry_run to preview changes as a unified diff.

Instructions

Replace an exact string in a file. dry_run=true previews a unified diff without writing.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
newYes
oldYes
pathYes
dry_runNo
replace_allNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.8.0

TDQS

C2.8/5.0
Behavior3/5

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

The description adds the dry_run behavior, which is not covered by annotations. However, it does not disclose other behavioral traits such as what happens if the old string is not found, whether the file is modified in place, or how replace_all affects the operation. Annotations indicate non-readonly and non-destructive, but the description does not elaborate on side effects. It provides some context but is thin.

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

Conciseness3/5

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

The description is concise and front-loaded with the core action, which is good. However, it is so short that it omits essential parameter details and usage context. While conciseness is valued, it comes at the cost of completeness, making it only minimally acceptable.

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

Completeness2/5

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

Given the tool has five parameters with three required and an output schema, the description should cover input semantics and notable behaviors. It does not explain the required parameters (path, old, new) or the replace_all option, and it does not mention error conditions or return value expectations. It is incomplete for an agent to use this tool correctly.

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

Parameters2/5

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

Schema description coverage is 0%, so the description must compensate by explaining parameters. It only mentions dry_run, and even that is already present in the schema with a default and title. It does not explain path, old, new, or replace_all, leaving the agent to infer their meaning from parameter names. This is insufficient for a low-coverage situation.

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 states a specific action: 'Replace an exact string in a file.' This clearly identifies the verb and resource. It implicitly differentiates from patch-based tools by emphasizing 'exact string,' but it does not explicitly name alternatives or contrast with siblings like apply_patch or write_file.

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?

No guidance is given on when to use this tool versus alternatives. The description does not mention scenarios where edit_file is preferred over apply_patch or write_file, nor does it state any exclusions or prerequisites. Only the dry_run flag is mentioned, which is a usage detail, not a selection criterion.

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

Deploy Server

Other Tools