Skip to main content
Glama

edit_content

Destructive

Edit large files by searching and replacing text with fuzzy matching, preview changes before applying, and automatically create backups for safe undo.

Instructions

Edit large files using search/replace with fuzzy matching.

Use instead of line-based editing to avoid LLM line number errors. Fuzzy
matching handles whitespace and formatting differences automatically.
Preview mode (default) shows diff without applying. Creates automatic
backup before changes - use revert_edit to undo. Does NOT support regex
in replacement - patterns must be literal text (use fuzzy=true for
flexibility).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
absolute_file_pathYesAbsolute path to target file
changesYesArray of {search, replace, fuzzy?} objects. Applied in order.
fuzzyNoEnable fuzzy matching for all changes (default: true)
previewNoShow diff preview without applying changes. Always preview first!
Behavior5/5

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

Beyond annotations (destructiveHint=true), the description adds that it creates automatic backups before changes, preview mode shows a diff without applying, and fuzzy matching handles whitespace/formatting differences. All disclosures are accurate and non-contradictory.

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?

Five sentences with front-loaded purpose, usage guidelines, and behavioral traits. Every sentence is informative and no redundant wording.

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

Completeness4/5

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

For a mutation tool with no output schema, the description explains preview behavior and automatic backup but does not specify the return value when changes are applied. Minor gap, but otherwise comprehensive given annotations and schema coverage.

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

Parameters4/5

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

Schema covers all parameters (100%), and the description adds contextual meaning: explains that changes are search/replace objects, preview mode shows diff, and fuzzy matching handles whitespace/formatting. This adds value beyond the schema.

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 it edits large files using search/replace with fuzzy matching, distinguishing it from sibling tools like read_content (read-only) and revert_edit (undo).

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?

Explicitly recommends using instead of line-based editing to avoid line number errors, notes that regex is not supported, and suggests using fuzzy=true for flexibility. Also mentions revert_edit as an alternative for undoing.

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/peteretelej/largefile'

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