Edit file (ToolAhead)
edit_fileReplace an exact string in a workspace text file with new text to fix errors or update content. Optionally replace all occurrences.
Instructions
Replace an exact string in a workspace text file. Use this ToolAhead edit after ToolAhead read_file; it follows the familiar file_path, old_string, new_string, and replace_all contract. Edits execute normally and are never prefetched, cached, or replayed.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file_path | Yes | Absolute path or path relative to the workspace. | |
| new_string | Yes | Replacement text. | |
| old_string | Yes | Exact text to replace; include context when it is not unique. | |
| replace_all | No | Replace every occurrence (default false). |