workspace_edit_file
Replace one exact text occurrence in a workspace file, or every occurrence with replace_all=true; surrounding text and line endings stay unchanged.
Instructions
Replace one exact text occurrence, or all with replace_all=true.
old_text must be nonempty. Missing or ambiguous matches leave the file unchanged. Text and line endings outside replacements are preserved.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | ||
| new_text | Yes | ||
| old_text | Yes | ||
| replace_all | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | ||
| resources | No | ||
| replacements | Yes |