replace_exact
Replace exactly one occurrence of text in a file with atomic writes and an undo snapshot to avoid unintended edits.
Instructions
Replace exactly one occurrence of text. Uses atomic write with undo snapshot.
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": {
"file": "<file>",
"search": "<search>",
"replacement": "<replacement>"
},
"name": "replace_exact"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file | Yes | Relative file | |
| search | Yes | Exact text to find | |
| replacement | Yes | New text | |
| expectedSha256 | No | Optional optimistic concurrency SHA-256 |