Skip to main content
Glama

cmd_batch

Runs multiple CMD commands one by one in separate cmd.exe processes, stopping on the first failure unless continueOnError is enabled.

Instructions

Run multiple CMD commands one by one. Each command runs in its own cmd.exe /c process (no hanging). Stops on first failure unless continueOnError is true.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "commands": "<commands>"
    },
    "name": "cmd_batch"
  }
}

Input Schema

NameRequiredDescriptionDefault
timeoutNoTimeout per command in ms. Defaults to 10000. Max 30000.
commandsYesCommands to run sequentially
continueOnErrorNoContinue running after a command fails. Defaults to false.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.1.0

TDQS

A3.6/5.0
Behavior3/5

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

With no annotations supplied, the description carries the full behavioral burden, and it does disclose real behavior: sequential execution, an isolated cmd.exe /c process per command (implying state does not persist between commands), and fail-fast semantics with a documented override. However, it says nothing about permissions or elevated privileges required, that arbitrary shell commands may be destructive, or anything about the returned output per command. Useful but incomplete for an arbitrary-command executor.

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?

Three short sentences, front-loaded with what the tool does, then the process-isolation trait, then the failure policy. Every sentence carries distinct information and nothing is wasted.

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?

For a 3-parameter tool with fully documented schema and no output schema, the definition covers the essential execution model (sequential, isolated processes, fail-fast). The main remaining gap is that an agent gets no hint of the result shape per command (stdout/stderr/exit status), which matters when deciding how to inspect failures.

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

Parameters3/5

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

Schema description coverage is 100%, so commands, per-command cwd, timeout and continueOnError are all documented in the schema itself, making 3 the baseline. The description restates the continueOnError behavior but adds no extra semantics such as the 30000ms ceiling or what happens to remaining commands when a failure occurs mid-batch.

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

Purpose4/5

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

States a specific verb (run) and resource (multiple CMD commands) and adds the key scope constraint: commands execute one by one. The word 'multiple' implicitly separates it from the single-command siblings cmd_run and cmd_admin_run, though it never names them explicitly.

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

Usage Guidelines3/5

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

Usage is implied rather than prescribed: 'multiple CMD commands one by one' signals the batch case versus a single-command tool, and 'Stops on first failure unless continueOnError is true' gives the control lever. There is no explicit when-to-use/when-not guidance, no mention of cmd_run, cmd_admin_run or powershell_run as alternatives, and no note on when PowerShell would be preferable to CMD.

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