batch_edit
Apply multiple replace_text and insert_paragraph edits to a DOCX or ODT file in one validated call; conflicts are rejected before changes, and applied steps emit tracked changes.
Instructions
Single-agent front door for applying multiple edit steps (replace_text, insert_paragraph) to a document in one call. Validates all steps first, rejects conflicts before applying anything, then executes valid steps sequentially. Two source-proven bonded heading/body insertions may share an anchor and position when both declare the same bonded_pair_id and distinct style_source_id values; unrelated same-slot inserts remain conflicts. Accepts inline steps or a plan_file_path JSON array. Surface: revisionable — every applied step emits native OOXML tracked changes.
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_path": "<file_path>"
},
"name": "batch_edit"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| steps | No | JSON array of edit steps. Each step needs step_id, operation, and operation-specific fields. | |
| file_path | Yes | Path to the DOCX or ODT file. | |
| plan_file_path | No | Path to a .json file containing an array of edit steps. Mutually exclusive with steps. |