apply_text_spans
Apply multiple non-overlapping text span edits to a file using 0-based offsets. Specify start and end positions with replacement text, with optional guards and encoding preservation.
Instructions
Apply multiple non-overlapping normalized-text span edits using 0-based offsets.
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>",
"spans": "<spans>"
},
"name": "apply_text_spans"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| bom | No | preserve | |
| path | Yes | ||
| spans | Yes | ||
| newline | No | preserve | |
| encoding | No | preserve | |
| base_hash | No | ||
| final_newline | No | preserve |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |