Skip to main content
Glama

bash

Run shell commands in an isolated, no-network sandbox at the repo root to reproduce bugs or handle tasks other tools do not cover; each call returns exit code and combined output.

Instructions

Run a shell command in the repository root (/workspace) inside an isolated sandbox with no network. Each call starts a fresh shell: cd and environment variables do not persist between calls. Returns the exit code and combined stdout/stderr; long output keeps the first 100 and last 50 lines with a '[... N lines truncated ...]' marker, so filter output (grep, head) when you can. Use it for anything the other tools do not cover, e.g. running a small Python snippet to reproduce a bug. Commands are killed after timeout_s seconds.

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": {
      "command": "<command>"
    },
    "name": "bash"
  }
}

Input Schema

NameRequiredDescriptionDefault
commandYes
timeout_sNo

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.7/5.0
Behavior4/5

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

No annotations exist, so the description carries the full burden, and it does most of it: no network, per-call fresh shell with no persisted cd/env, exit code plus combined stdout/stderr, truncation at first 100 / last 50 lines with an explicit marker, and a timeout kill. The only gaps are whether filesystem writes persist across calls and whether the sandbox is ephemeral.

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?

Four sentences, front-loaded with the core verb and environment before the state-isolation and truncation caveats, then the sibling routing. Every sentence adds operational information an agent needs; nothing is wasted.

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?

Even though an output schema exists, the description still surfaces the parts that actually affect how an agent should call it (truncation strategy). Sandbox, state, network, timeout, and fallback role are all covered for a two-parameter tool.

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?

Schema coverage is 0%, so the description must compensate. It names timeout_s directly and explains its effect ('commands are killed after timeout_s seconds'), and 'shell command' plus the sandbox description fully disambiguates the command parameter. The default value of 60 remains visible only in the schema.

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), the execution location (/workspace repository root), and the execution environment (isolated sandbox, no network). It also positions itself among siblings as the fallback for anything the other tools (search, view_file, diff, run_tests, str_replace) do not cover.

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?

Explicitly says when to reach for it: anything the other tools do not cover, with a concrete example (small Python snippet to reproduce a bug). It also gives actionable usage advice — filter output with grep/head because of truncation — and states the no-network constraint that rules out downloading dependencies.

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