preview_batch
Dry-run a batch of InDesign commands against the cached document model to validate them before execution. Use after scanning to preview changes without writing to InDesign.
Instructions
Dry-run a batch against the cached Document Model (no InDesign writes). Call after scan_document. Prefer preview_batch before a large execute_batch.
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": {
"commands": "<commands>"
},
"name": "preview_batch"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| commands | Yes | Batch commands (prefer ONE execute_batch over many tools). Ops: checkpoint, move, resize, delete, duplicate, createTextFrame, setText, replaceText, setFont, setFill, align, distribute, center, stack, applyMargins, applyStyle, createStyle, updateStyle, relinkAsset, replaceAsset, embedAsset. checkpoint: {op:'checkpoint', tag?, keep?} saves an .indd copy to _checkpoints/ and runs before the undo transaction. createTextFrame: {op, x,y,width,height,text?} or {op, below:{role|uuid|selection}, gapPt?, text?}. Geometry in points. Requires prior scan_document (and analyze_page for role targets). |