edit_file
Replace exact line sequences in text files within allowed directories. Preview changes with dry run and get a git-style diff of modifications.
Instructions
Make selective edits to a text file based on exact line matches (or whitespace normalized). Each edit replaces an existing sequence of lines (old_text) with new lines (new_text). Returns a git-style diff of the changes. Use dry_run to preview. Only works within allowed directories:
/app
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | Path to the file to edit | |
| edits | Yes | List of edit operations | |
| dry_run | No | Preview changes without applying |