cad_batch
Run, schedule, and manage sequences of CAD operations as batch jobs. Supports synchronous execution, cron/one-off scheduling, dependency chaining, sandboxed scripts, and job inspection.
Instructions
Execute, schedule, inspect or manage batch jobs.
按 ``action`` 执行批处理操作:execute / schedule / status / cancel / list /
templates / run_script。
- ``execute``: run a list of tool calls synchronously (each ``command``
has ``tool`` + ``arguments``); ``stop_on_error`` halts on the first
failure.
- ``schedule`` / ``status`` / ``cancel`` / ``list``: create and manage
one-off / cron / dependency-chained jobs (durable across restarts).
- ``templates``: list reusable Jinja2 command templates.
- ``run_script``: execute a sandboxed script (python / scr / batch).
When not to use: ``cad_batch`` sequences *other* tools. For a single
operation call the concrete aggregate directly (``cad_object``,
``cad_file``, ...). ``execute`` is synchronous — use ``schedule`` for
long-running work.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| batch | No | Batch action to perform, discriminated by `action`: execute (run commands synchronously), schedule, status, cancel, list, templates or run_script. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ok | No | Whether a script completed successfully | |
| jobs | No | Job summaries | |
| name | No | Job name | |
| state | No | Job state | |
| action | Yes | Batch action | |
| job_id | No | Job id | |
| status | Yes | Operation status | |
| stderr | No | Captured stderr | |
| stdout | No | Captured stdout | |
| message | No | Status description | |
| results | No | Per-command results | |
| exit_code | No | Process exit code | |
| templates | No | Template names | |
| timed_out | No | Whether execution hit the timeout | |
| created_at | No | Creation timestamp | |
| duration_ms | No | Execution time in milliseconds | |
| script_type | No | Script type that ran | |
| failed_count | No | Failed commands | |
| command_count | No | Number of commands | |
| success_count | No | Successful commands | |
| blocked_imports | No | Blocked imports |