bash_batch
Execute a preplanned multi-step bash workflow in a single MCP round trip, with serial atomic steps and per-step results. Use it to replace repeated bash calls when the full sequence is known.
Instructions
Compile and execute a preplanned multi-step bash workflow in one MCP round trip.
Use this instead of repeated bash calls when the complete sequence is already known. Steps run serially and atomically in the same persistent session: later steps see cwd, environment, and files from earlier steps, while run/reset requests cannot interleave. Every command is parsed and translated before step 1 runs, and the result reports each step separately.
By default the batch stops after the first nonzero exit. Set stop_on_error=false only when later steps should still run. timeout_ms and both output limits apply to the whole batch, not once per step. Output defaults to 256 KiB stdout and 64 KiB stderr; redirect larger artifacts to files. Preflight performs no operand-file reads: use sed -e with inline script text instead of sed -f. If a later command depends on model interpretation of an earlier result, use separate bash calls instead. For byte counts, include wc -c or stat -c %s as a verification step rather than calculating CRLF bytes mentally.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| steps | Yes | Ordered workflow steps; all are compiled before execution begins | |
| timeout_ms | No | Total timeout for the complete batch (default 120000) | |
| stop_on_error | No | Stop after the first nonzero exit (default true) | |
| stderr_limit_bytes | No | Total stderr budget shared by every step (default 65536) | |
| stdout_limit_bytes | No | Total stdout budget shared by every step (default 262144) |