Batch Replace
batch_replaceSearch and replace exact text across multiple files matched by a glob pattern, with a configurable safety cap on modified files.
Instructions
Search and replace a string across multiple files matching a glob pattern.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| pattern | Yes | Glob pattern matching files (e.g. 'src/**/*.py', '*.ts'). | |
| max_files | No | Safety cap on modified files. | |
| root_path | No | Base directory for search. | . |
| new_string | Yes | Replacement text. | |
| old_string | Yes | Exact text to search for. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |