batch
Group many Illustrator tool steps into one call to cut round trips. Execute ordered steps with optional stop-on-error, rollback, per-file runs, saving, and export.
Instructions
Run many tool steps in ONE call (one round trip to Illustrator). steps: [{tool, args, artboard?}] — artboard: this step's coordinates start at that artboard's top-left; any tool except status, configure, preview, export and batch. Refer to an earlier step's items with "@n" (0-based step index) wherever a ref is accepted, e.g. {tool:"selection", args:{action:"set", refs:"@0"}}. stop_on_error (default true): stop at the first failing step. rollback (default false): if a step fails, delete the items created during the batch (not raw API creations in run_script) and close an empty new document. results: "all" (default) | "errors" (failures + counts, for big batches). steps_file: a JSON file with the steps (array or {steps}) instead of steps. files: run the steps on each file (paths, folders, globs like "jobs/*.ai"): open → steps → save → export → close. save: "copy" (default: into out_dir, originals untouched) | "in_place" (overwrites) | "none". export: [{format, path with {name} = file stem, …}]. Files already open are skipped. dry_run:true → open, run, report, close without saving or exporting.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "batch"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| save | No | ||
| files | No | ||
| steps | No | ||
| export | No | ||
| dry_run | No | ||
| out_dir | No | ||
| results | No | ||
| timeout | No | seconds for the whole batch, default from configure | |
| rollback | No | ||
| steps_file | No | ||
| stop_on_error | No |