Skip to main content
Glama
Trigodil
by Trigodil

edit_file

Replace specific text in a file to fix errors without rewriting the whole file. Use targeted edits to update content efficiently.

Instructions

Edit a file by replacing old_text with new_text. Use this to fix errors instead of rewriting the whole file.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYes
new_textYes
old_textYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior2/5

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

No annotations exist, so the description carries full responsibility for behavioral disclosure. It states the replacement action but fails to mention key behaviors: whether replacement is global or first-occurrence, error handling if old_text is not found, whether the file must already exist, or side effects on file attributes. This is a significant transparency gap for a mutation tool.

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 concise, front-loaded sentences with no unnecessary information. It efficiently conveys the core action and primary use case.

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 simple tool with an output schema, the description covers the basic operation and use case. However, it omits edge-case handling such as missing old_text or non-existent files, which is important for an agent to predict outcomes. With no annotations, a bit more detail would make it complete.

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 descriptions are completely absent (0% coverage), so the description must compensate. It explains old_text as the text to find and new_text as the replacement, but does not clarify path expectations (e.g., must exist, absolute/relative) or constraints on old_text uniqueness. This adds some meaning but leaves parameters under-specified.

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 tool edits a file by replacing old_text with new_text, using a specific action verb and resource. It also differentiates from sibling write_file by noting 'instead of rewriting the whole file.'

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

Usage Guidelines5/5

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

Explicit usage guidance is provided: 'Use this to fix errors instead of rewriting the whole file,' which clearly tells the agent when to choose edit_file over rewriting the entire file (write_file).

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/Trigodil/jan-terminal-mcp'

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