quick_search_replace
Find and replace all occurrences of a string or regex pattern within a file. Supports regex mode and external file access when approved.
Instructions
SEARCH & REPLACE: Search for a string or Regex pattern and replace all occurrences in a file.
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": {
"filePath": "<filePath>",
"searchPattern": "<searchPattern>",
"replacement": "<replacement>"
},
"name": "quick_search_replace"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| filePath | Yes | File path | |
| useRegex | No | Enable to use Regular Expression | |
| replacement | Yes | Replacement content | |
| searchPattern | Yes | Text string or Regex pattern to find | |
| allow_external_access | No | Set to true to allow modifying files outside the project root. User must explicitly approve this action. |