find_replace
Locate and substitute text in a file to update content, supporting single or multiple replacements.
Instructions
Find and replace text in a single 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>",
"find": "<find>",
"replace": "<replace>"
},
"name": "find_replace"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| filepath | Yes | Path to the file | |
| find | Yes | Text to find | |
| replace | Yes | Text to replace with | |
| all_occurrences | No | Replace all occurrences |