Skip to main content
Glama

run_batch_commands

Execute multiple shell or PowerShell commands in one batch call to reduce permission prompts. Run commands sequentially with optional stop-on-error and per-command timeout.

Instructions

Executes multiple shell/PowerShell commands sequentially in a single tool call. Reduces permission prompts from N to 1. Parameters: commands: List of shell command strings to execute in order. working_dir: Working directory for all commands. stop_on_error: If True, halts execution if any command returns non-zero exit code. timeout_per_command: Max seconds per command (default: 180s).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sourceNo
commandsYes
working_dirNo
stop_on_errorNo
timeout_per_commandNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.2/5.0
Behavior2/5

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

No annotations are provided, so the description must carry the full behavioral burden. However, it only mentions that commands are executed and does not disclose potential side effects, required permissions, return output, or error handling beyond the stop_on_error parameter. This leaves safety and behavior underspecified.

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 concise, with a clear main statement and a structured parameter list. No redundant words or filler, and the information is easy to scan.

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

Completeness4/5

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

The tool has an output schema (though not shown), so return-value details are not required in the description. It covers the core functionality, parameter meanings, and a key use-case benefit. Minor gaps like prerequisites or environment assumptions are not mentioned, but they are not critical for a batch command executor.

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?

The description includes a 'Parameters' section that provides a one-line explanation for each parameter (e.g., 'commands: List of shell command strings to execute in order,' 'stop_on_error: If True, halts execution...'). This adds meaningful semantics beyond the bare schema titles, covering all five parameters.

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 clearly states the verb 'executes' and the resource 'multiple shell/PowerShell commands,' and distinguishes it from sibling tools like run_system_command by highlighting the batch nature and the benefit of reducing permission prompts.

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 explicitly states a usage guideline: 'Reduces permission prompts from N to 1,' which tells the agent when to prefer this tool (for multiple commands) over individual command execution.

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