edit_block
Replace the Nth occurrence of a target text string in a file with your replacement, allowing precise edits when the same text appears multiple times.
Instructions
Replace the Nth occurrence of text 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": {
"path": "<path>",
"target": "<target>",
"replacement": "<replacement>"
},
"name": "edit_block"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | ||
| target | Yes | ||
| occurrence | No | ||
| replacement | Yes |