replace_range
Atomically replace a line range in a file using an optimistic-lock hash to prevent conflicts during concurrent edits.
Instructions
Atomically replace an inclusive line range using a mandatory optimistic-lock hash.
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>",
"start_line": "<start_line>",
"end_line": "<end_line>",
"replacement": "<replacement>",
"expected_sha256": "<expected_sha256>"
},
"name": "replace_range"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | ||
| end_line | Yes | ||
| start_line | Yes | ||
| replacement | Yes | ||
| expected_sha256 | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||