Skip to main content
Glama

shell

Run bash commands inside an isolated Linux sandbox instead of the host, with support for foreground or background execution, timeouts, output retrieval, and job control.

Instructions

Run a shell command (bash) inside an isolated Linux sandbox, not on the host machine. The host directory /app is mounted in the sandbox at /workspace; the command starts in /workspace and only files under that directory are shared with the host. The working directory persists between calls, but environment variables and shell state (aliases, functions) do not. Do not rely on cd across parallel calls: each starts in the directory current when it starts, and the last to finish sets it. Default timeout is 120 seconds, maximum 600 seconds (timeout_ms). Use run_in_background for servers and other long-running processes; it returns a job id to use with shell_output, shell_kill and shell_list. Interactive programs (editors, pagers, prompts waiting for input) are not supported. Paths in output under /workspace are shown as host paths under /app. To read or edit files, use your file tools with host paths (/app) rather than shell commands.

Input Schema

NameRequiredDescriptionDefault
commandYesThe shell command to run
timeout_msNoTimeout in milliseconds
descriptionNoShort description of what the command does
run_in_backgroundNoRun as a background job and return a job id

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.2.0

TDQS

A4.8/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 richly: sandbox isolation, /app↔/workspace mount mapping, cwd persistence across calls, non-persistence of env vars/aliases/functions, the parallel-cd race caveat, timeout defaults and ceiling, and background job id semantics. This is exactly the behavioral context an agent needs before invoking a shell.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded with the single most important fact (sandbox, not host), then proceeds through mount, state, concurrency, timeout, background, and alternatives in a logical order. It runs long, but nearly every sentence carries operational meaning; only the host-path rendering note is slightly redundant with the file-tools instruction.

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 shell tool with no annotations and no output schema, the description covers isolation model, filesystem mapping, state persistence rules, concurrency hazards, timeouts, background execution, and interactive limitations. Nothing an agent needs to invoke it correctly appears to be missing.

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 100%, so baseline is 3; the description still adds value by giving the concrete default (120s) and maximum (600s) for timeout_ms and by explaining that run_in_background returns a job id consumed by shell_output/shell_kill/shell_list. Minor gap: the stated 600-second maximum conflicts with the schema's numeric maximum of 9007199254740991, which could confuse the agent on the true bound.

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 (run) and resource (bash shell command) with the critical scope qualifier 'inside an isolated Linux sandbox, not on the host machine'. It also implicitly distinguishes itself from the shell_output/shell_kill/shell_list siblings by naming them in the background-job workflow.

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 routes the agent: use run_in_background for servers/long-running processes, do not use shell for reading or editing files (use file tools with /app host paths), and interactive programs are unsupported. These are concrete use/do-not-use rules with named alternatives.

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