Skip to main content
Glama

Run shell

shell_run

Run a shell command in your account's container sandbox and get back what it wrote. A real shell in a container: pipes, redirection and && all work, the working directory is /work and files there persist between calls. Use it to build, test, run scripts and move files about. A non-zero exit code comes back in the response rather than as an error, so read the output — a failing build is an answer

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
dirNoDirectory to run it in, under /work. Defaults to /work
commandYesA shell command to run, e.g. 'go test ./... 2>&1 | tail -40'
timeoutNoSeconds to allow, up to the instance's maximum. Defaults to 120

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added
  2. Removed
  3. Added

TDQS

A4.4/5.0
Behavior4/5

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

The description discloses key behavioral traits: it runs in a persistent container ('files there persist between calls'), supports real shell features, and returns non-zero exit codes as part of the response. This goes beyond the basic 'Run shell' annotation. It does not explicitly warn about destructive commands, but the persistent container and real shell nature are sufficiently transparent.

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 and well-structured: it starts with the core purpose, then details capabilities, then gives use cases, and finishes with an important behavioral note. Every sentence adds value—no fluff or redundancy. The front-loading of the main function makes it 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?

Given there is no output schema, the description adequately explains what the caller receives: the command's output and a non-zero exit code. It also covers the persistent working directory and shell behavior, which are essential for correct usage. It does not describe timeout enforcement details, but that is covered by the parameter description and is not critical for basic use.

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 schema covers all three parameters (command, dir, timeout) with descriptions, achieving 100% coverage. The tool description adds valuable context: the working directory defaults to /work and files persist, which clarifies the 'dir' parameter. It also notes that non-zero exit codes are in the response, supplementing the schema. This exceeds the baseline for fully described 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 clearly states the tool's function: 'Run a shell command in your account's container sandbox and get back what it wrote.' It explicitly mentions capabilities like pipes, redirection, and persistence, distinguishing it from tools like shell_write that handle file writing. The purpose is unambiguous and specific.

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

Usage Guidelines4/5

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

The description gives direct guidance on when to use it: 'Use it to build, test, run scripts and move files about.' It also explains that non-zero exit codes come back in the response, so it is clearly appropriate for failing builds. However, it does not explicitly mention when not to use it or alternatives, leaving a small gap in exclusion guidance.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.