apply_text_edits
Apply multiple non-overlapping line-range edits to a file atomically, with optional guard text and encoding preservation.
Instructions
Apply multiple non-overlapping line-range edits in a single atomic write.
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>",
"edits": "<edits>"
},
"name": "apply_text_edits"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| bom | No | preserve | |
| path | Yes | ||
| edits | Yes | ||
| newline | No | preserve | |
| encoding | No | preserve | |
| base_hash | No | ||
| final_newline | No | preserve |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |