run_batch_macros
Run an ordered list of macros sequentially, stopping on error or continuing to record failures. Useful for automating multi-step microscopy workflows.
Instructions
Run several macros in sequence. On failure, behavior depends on continue_on_error: either stop or record the error and continue. Each successful step returns the same shape as run_macro.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| macros | Yes | Ordered list of macro strings; each should be non-empty after strip(). | |
| continue_on_error | No | If true, record per-step errors and continue; if false, stop on first failure. | |
| retries_per_step | No | Retries passed to run_macro for each non-empty step. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ok | Yes | True only if every step succeeded. | |
| total_steps | Yes | Number of macros requested. | |
| completed_steps | Yes | Steps attempted before stop (may be less than total if stopped early). | |
| failed_steps | Yes | Count of steps with ok=false. | |
| results | Yes | Per-step outcomes in order. |