Skip to main content
Glama

run_shell

Run Bash commands for builds, tests, or inspection after heuristic policy checks, returning truncated output or a refusal. Blocked or escalated commands are not executed.

Instructions

Execute a Bash command after heuristic policy checks. Use for build, test or inspection commands, not file writes or structured Git operations. Returns truncated stdout/stderr, or a refusal prefixed with ⛔. BLOCK and ESCALATE decisions are not executed. Shell execution is not sandboxed; passing a check does not establish that a command is safe.

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": {
      "cmd": "<cmd>"
    },
    "name": "run_shell"
  }
}

Input Schema

NameRequiredDescriptionDefault
cmdYesBash command to run from the configured workspace, for example 'ls -la'. Do not include credentials or secret values.

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.3.0

TDQS

A4.7/5.0
Behavior5/5

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

With no annotations, the description carries the full burden and does so: it discloses the policy-check step, that BLOCK and ESCALATE decisions are never executed, that output is truncated stdout/stderr or a ⛔-prefixed refusal, and the critical caveat that execution is not sandboxed and a passed check does not imply safety.

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?

Five short sentences, each earning its place: purpose, routing guidance, return shape, refusal semantics, and the safety caveat are front-loaded with no filler. Nothing is repeated from structured fields.

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?

For a single-parameter execution tool with an output schema, this covers everything an agent needs: what it runs, what it won't run, what it returns, and the security limitation. The safety warning in particular is exactly the kind of non-schema information that must live in the description.

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% for the single 'cmd' parameter, including the workspace context and the credential warning, so the schema already does the work. The description adds no further syntax, quoting, or format guidance beyond what the schema states, which is the expected baseline.

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 gives a specific verb and resource ('Execute a Bash command') plus the governing mechanism ('after heuristic policy checks'), and explicitly distinguishes scope from file writes and structured Git operations, so an agent can separate it from write_file and git without opening either 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?

It states both when to use it ('build, test or inspection commands') and when not to ('not file writes or structured Git operations'), which routes the agent to the correct sibling category by capability rather than by name.

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