Edit local file
editReplace one exact text string in an existing local text file only when it occurs exactly once; if it is missing or duplicated, the operation fails.
Instructions
Make one exact targeted replacement in an existing local text file. old_text must occur exactly once; the call fails if it occurs zero times or more than once.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | Path to the existing text file. | |
| new_text | Yes | Replacement text. May be empty to delete old_text. | |
| old_text | Yes | Exact text that must occur exactly once. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | ||
| bytes_after | Yes | ||
| bytes_before | Yes | ||
| replacements | Yes |