Apply structured edits to a spec
apply_editsApply edit operations to a document spec to update its content losslessly. Use replace, set, append, or remove ops to modify the spec.
Instructions
Apply a list of edit ops (replace | set | append | remove) to a spec and return the edited, re-validated spec. The caller re-renders the result. Because the spec is the source of truth, editing the spec (not the bytes) is lossless.
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": {
"format": "<format>",
"spec": "<spec>",
"ops": "<ops>"
},
"name": "apply_edits"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ops | Yes | Edit ops: {op:'set',path,value} | {op:'append',target,value} | {op:'remove',target,index} | {op:'replace',value}. | |
| spec | Yes | The current spec. | |
| format | Yes | xlsx | pptx | docx |