Skip to main content
Glama
office233
by office233

run_command

Destructive

Executes a shell command and waits for completion, returning exit code, stdout, and stderr for builds, tests, git, npm, Python, or ffmpeg tasks.

Instructions

Run a shell command (/bin/bash) and wait for it to finish. Returns exitCode, stdout, stderr. Use for builds, tests, git, npm, python, ffmpeg, etc. For servers/watchers that never exit use process_start.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
cwdNoWorking directory (default: default workspace)
stdinNoOptional text piped to stdin
commandYes
timeoutMsNoDefault 120000
resourceClassNoAdmission class; defaults to automatic command classification
resourceWaitMsNoHow long to wait for CPU/RAM capacity before refusing the command

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv3.0.1

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already declare the destructive, non-idempotent, open-world profile, so credit goes to what the description adds: blocking-until-completion semantics and the return contract (exitCode, stdout, stderr). It does not explain what happens on timeout (whether the process is killed, partially run, or left alive), which matters for a destructive tool with a 120s default timeout.

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 tight sentences, front-loaded with the action and completion behavior, then usage examples, then the routing exclusion. No filler.

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?

With no output schema, the description usefully names the return fields and the blocking behavior. The remaining gap is timeout semantics and the resource-admission refusal path (resourceWaitMs), which an agent running heavy/destructive commands would benefit from knowing.

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 83%, so the schema already documents cwd, stdin, timeoutMs, resourceClass, and resourceWaitMs. The description adds no parameter-level detail beyond the schema baseline, so the standard 3 applies.

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?

States a specific verb and resource ('Run a shell command (/bin/bash)') plus a key execution trait ('wait for it to finish'), and names the sibling it is not (process_start) for the never-exiting case. An agent can distinguish it from job_start/pty_start/process_start without opening any schema.

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?

Gives concrete positive examples (builds, tests, git, npm, python, ffmpeg) and an explicit exclusion with the alternative to use instead ('For servers/watchers that never exit use process_start'). This is exactly the when/when-not/alternative pattern.

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