Search and Replace
search_and_replaceReplace substrings in files with fuzzy whitespace fallback, preview changes via dry-run, and validate syntax for .py, .json, .toml, .yaml. Returns unified diff.
Instructions
Primary file editing tool — prefer over patch. Replaces substrings with fuzzy whitespace fallback. Returns unified diff. Validates .py/.json/.toml/.yaml syntax.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| edits | Yes | [{"old": "exact_text", "new": "replacement"}] | |
| dry_run | No | Preview diff without applying. | |
| filepath | Yes | File path relative to /workspace. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |