Skip to main content
Glama

sandbox_exec

Run shell commands inside a project's sandbox, defaulting to /workspace/repo, to inspect the repository or build manually when automatic installation falls short.

Instructions

Run a shell command (sh -c) inside a project's sandbox, by default in the checkout (/workspace/repo). Use it to inspect the repository, or to build by hand when automatic installation fell short.

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

Input Schema

NameRequiredDescriptionDefault
cwdNoWorking directory (default /workspace/repo).
stdinNoText piped to stdin.
commandYesShell command line.
projectYesInstalled project: its slug, or its id such as "github:owner/name".
timeout_secondsNoTime limit (default 120, max 3600).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.6/5.0
Behavior3/5

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

With no annotations, the description must carry the behavioral burden, and it does disclose the sh -c execution model, the sandbox boundary, and the default checkout path. It says nothing about side effects, whether state persists between calls, network access, what happens if the project is not installed, or how failures surface — significant omissions for an arbitrary-execution tool.

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?

Two sentences, both front-loaded with the execution model first and the usage rationale second; there is no filler. The build-by-hand clause is slightly compressed but still readable.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a five-parameter arbitrary command runner with no annotations and no output schema, the definition should say what comes back (stdout/stderr/exit status) and when execution is rejected. The isolation and fallback framing is present, but the return contract and failure behavior are left entirely unstated.

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 coverage is 100%, so the baseline is 3; every parameter including cwd, stdin, timeout_seconds, and project is already documented in the schema. The description only restates the default cwd, which duplicates the schema, and adds no new meaning about the project slug/id or timeout semantics.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/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: run a shell command (sh -c) inside a project's sandbox, with the default working directory named. It implicitly separates itself from sandbox_read_file and sandbox_write_file by being general command execution, but it never names a sibling or states the boundary explicitly.

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?

Two concrete use cases are given: inspecting the repository, and building by hand when automatic installation fell short. That is clear positive guidance with an implied fallback-after-install_project ordering, but there is no explicit when-not-to-use or statement about preferring the file tools for simple reads/writes.

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