edit_file
Replace an exact string that appears exactly once in a file with a new string, ensuring precise single-occurrence replacement.
Instructions
Replace an exact string in a file. The old_string must appear exactly once.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | File path | |
| old_string | Yes | Exact text to find and replace | |
| new_string | Yes | Text to replace it with | |
| workspace_root | No | Workspace root directory (optional) |