Skip to main content
Glama

Edit File

edit
Destructive

Apply targeted exact text replacement in workspace files and receive a unified diff to review changes.

Instructions

Apply a targeted exact text replacement inside a workspace text file. Returns a unified diff.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYesFile path relative to workspace root.
new_textYesReplacement text.
old_textYesExact text to replace. Must match once unless replace_all=true.
replace_allNoReplace all occurrences. Default: false.
workspace_idNoWorkspace id from open_workspace. Omit to use default workspace.
expected_replacementsNoFail if actual replacement count differs.
Behavior3/5

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

Annotations already declare destructiveHint=true, readOnlyHint=false, and idempotentHint=false. The description adds 'Returns a unified diff,' which is a useful behavioral detail about the output. It does not contradict annotations, but it does not go beyond them significantly—no mention of failure modes, atomicity, or safety considerations.

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 concise sentences with no filler. The primary action is front-loaded in the first sentence, and the return type is mentioned in the second. Every word earns its place.

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?

For a tool with 6 parameters and no output schema, the description covers the core operation and return format but omits usage context (when to prefer this over 'write'), edge-case behavior (e.g., what if old_text not found), and dependencies like workspace_id. The schema fills in some parameter details, but the description alone leaves an agent guessing about selection context.

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%, so all six parameters are already documented. The description adds no additional semantic context (e.g., typical values, relationships between parameters). It meets the baseline because the schema handles the parameters, but there is no extra value.

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?

Clear and specific: 'Apply a targeted exact text replacement inside a workspace text file.' The verb 'apply' and resource 'workspace text file' are explicit, and 'targeted exact text replacement' distinguishes it from siblings like 'write' (whole file) and 'search'/'read' (non-mutating).

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

Usage Guidelines1/5

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

No guidance on when to use this tool versus alternatives like 'write' or 'search'. The description does not mention exclusions, prerequisites, or typical scenarios. An agent has to infer that 'edit' is for small targeted changes, which is not explicitly stated.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/sedatustunova/S3dat-Relay'

If you have feedback or need assistance with the MCP directory API, please join our Discord server