Skip to main content
Glama

bash_batch

Destructive

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

TableJSON Schema
NameRequiredDescriptionDefault
stepsYesOrdered workflow steps; all are compiled before execution begins
timeout_msNoTotal timeout for the complete batch (default 120000)
stop_on_errorNoStop after the first nonzero exit (default true)
stderr_limit_bytesNoTotal stderr budget shared by every step (default 65536)
stdout_limit_bytesNoTotal stdout budget shared by every step (default 262144)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.13.0

TDQS

A4.9/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

The description richly discloses behavioral traits beyond the annotations: steps run serially and atomically in one persistent session, commands are pre-parsed before execution, output limits apply per-batch not per-step, preflight does no operand-file reads, and redirects are recommended for large artifacts. This complements the destructive/open-world hints with actionable detail.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is appropriately sized for a complex batch tool. It front-loads the core purpose and usage, then covers behavioral constraints, defaults, and caveats in a logical order. Every sentence conveys useful guidance without redundancy.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given no output schema, the description compensates by explaining step result reporting, failure behavior, session persistence, output limits, and preflight limitations. An agent has enough context to correctly select and invoke the tool, including how to handle large outputs and byte-count verification.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the schema already documents each parameter. The description adds meaningful semantics beyond the schema: timeout_ms and output limits apply to the whole batch rather than per step, and stop_on_error=false is recommended only when later steps should still run. This exceeds the baseline for fully-covered schemas.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a specific action ('Compile and execute a preplanned multi-step bash workflow in one MCP round trip') and explicitly contrasts it with repeated bash calls. It clearly distinguishes this tool from the single-command sibling bash by focusing on preplanned multi-step workflows.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description gives explicit when-to-use guidance: use instead of repeated bash calls when the complete sequence is already known. It also provides exclusions: use separate bash calls when later steps depend on model interpretation of earlier results, and explains when stop_on_error=false is appropriate.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Deploy Server

Other Tools