Skip to main content
Glama

file_edit

Modify file content by replacing specific text strings within workspace files using search and replace functionality.

Instructions

Edit an existing file in the workspace using search and replace. The old_string must exist in the file and should be unique.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
file_pathYesPath to the file, relative to the workspace directory
old_stringYesText to replace (must exist and be unique in the file)
new_stringYesReplacement text
replace_allNoReplace all occurrences instead of just the first
Behavior2/5

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

No annotations are provided, so the description carries the full burden. It mentions that 'old_string must exist in the file and should be unique,' which adds some behavioral context (constraints on input), but fails to disclose critical traits like whether the edit is destructive (likely yes, but not stated), error handling for missing files or non-unique strings, or any rate limits. The description is minimal and leaves key behavioral aspects unspecified.

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?

The description is two sentences, front-loaded with the core purpose, and every sentence adds value (the second clarifies constraints). There is no wasted text, making it highly efficient and easy to parse.

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 no annotations, no output schema, and a mutation tool (file editing), the description is incomplete. It lacks information on what the tool returns (e.g., success/failure, modified content), error conditions, or broader behavioral context. For a tool that modifies files, this leaves significant gaps in understanding its full operation.

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 the schema fully documents all parameters (file_path, old_string, new_string, replace_all). The description adds minimal value by reinforcing that old_string 'must exist and should be unique,' which slightly elaborates beyond the schema's 'must exist and be unique in the file.' This meets the baseline of 3 since the schema does the heavy lifting.

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?

The description clearly states the specific action ('Edit an existing file'), the method ('using search and replace'), and distinguishes it from siblings like file_read (read-only) and file_write (general write). It goes beyond the tool name by specifying the search-and-replace mechanism.

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?

The description implies usage by stating 'old_string must exist in the file and should be unique,' which suggests when to use this tool (for targeted text replacement) but doesn't explicitly compare it to alternatives like file_write for general file modifications or when not to use it. No explicit guidance on prerequisites or sibling tool selection is provided.

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/ephemeraldew/skill_mcp'

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