Skip to main content
Glama
gunwoo55
by gunwoo55

Edit local text file

edit_file
Destructive

Replace exact text in local UTF-8 files for precise edits, preserving all other content in the file.

Instructions

Replace exact text in a UTF-8 local file. Use for focused edits that preserve the rest of the file.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYes
newTextYes
oldTextYes
replaceAllNo
Behavior4/5

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

Annotations already disclose destructiveHint=true, but the description adds valuable context beyond that: it emphasizes 'exact text' matching and 'preserve the rest of the file,' which clarifies the non-destructive-to-unmatched-content nature of the edit. This is particularly useful because it signals that the tool does not truncate or rewrite the entire file. No contradiction with annotations; in fact, it reinforces them.

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, direct sentences with no filler. The most important action ('Replace exact text') comes first, followed by a parenthetical-style usage note. Every word earns its place. This is a model of conciseness.

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 destructive mutation tool with four parameters and no output schema, this description is functional but thin. It covers the core 'what' but leaves out edge cases like what happens if oldText is not found, whether matching is case-sensitive, and the behavior of replaceAll (since it defaults to false). Given the straightforward nature of the operation and the clear sibling distinction, it's adequate but not rich. A 3 reflects that it's the minimum viable for safe usage.

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?

With 0% schema description coverage, the description bears full responsibility for parameter meaning. It says 'exact text,' which hints that oldText/newText must be precise substrings, but it doesn't explicitly map to parameters or mention the replaceAll flag, path semantics, or error behavior. The description is a good start but leaves much of the parameter reasoning to inference. A 3 is appropriate because it gives some guidance but doesn't fully compensate for the lack of schema descriptions.

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 starts with a specific verb+resource: 'Replace exact text in a UTF-8 local file.' It clearly distinguishes this from siblings like write_file (which overwrites entire files) and file_operation (generic) by emphasizing 'focused edits' and 'preserve the rest of the file.' This is a textbook case of purpose clarity and sibling differentiation.

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

Usage Guidelines4/5

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

The second sentence, 'Use for focused edits that preserve the rest of the file,' provides explicit guidance on when to use this tool. While it doesn't explicitly name alternatives like write_file, the context makes clear that this is for targeted modifications rather than full rewrites. It could be improved by mentioning when not to use it, but the guidance is sufficient for basic selection.

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/gunwoo55/unlimited-agent'

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