edit_file
Edit files using replace, diff, line numbers, or character match methods. Select the appropriate editing approach for your task.
Instructions
Edit a file using various methods (replace, diff, line numbers, character matching)
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | Path to the file to edit | |
| method | Yes | Editing method to use | |
| target | No | Target text to find/replace (for replace and character-match methods) | |
| replacement | No | Replacement text | |
| startLine | No | Start line number (1-based, for line-numbers method) | |
| endLine | No | End line number (1-based, for line-numbers method) | |
| startChar | No | Start character position (0-based, for character-match method) | |
| endChar | No | End character position (0-based, for character-match method) | |
| diffContent | No | Diff content in unified format (for diff method) | |
| diffFormat | No | Diff format (default: unified) | unified |