edit_content
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
| Name | Required | Description | Default |
|---|---|---|---|
| absolute_file_path | Yes | Absolute path to target file | |
| changes | Yes | Array of {search, replace, fuzzy?} objects. Applied in order. | |
| fuzzy | No | Enable fuzzy matching for all changes (default: true) | |
| preview | No | Show diff preview without applying changes. Always preview first! |