find_and_replace
Search and replace text across multiple files with preview capability to review changes before applying them.
Instructions
Find and replace text across multiple files with preview option
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"searchPattern": "<searchPattern>",
"replacement": "<replacement>"
},
"name": "find_and_replace"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| searchPattern | Yes | Text or regex pattern to search for | |
| replacement | Yes | Replacement text | |
| files | No | Specific files to process | |
| filePattern | No | File pattern to match (e.g., "**/*.ts") | |
| regex | No | Treat search pattern as regex | |
| caseSensitive | No | Case sensitive search (default: true) | |
| wholeWord | No | Match whole words only | |
| preview | No | Preview changes without applying them | |
| backup | No | Create backup files before changes |