Skip to main content
Glama

Run command in sandbox

run_in_sandbox

Execute shell commands inside a session's sandbox from the repository root, then return the exit code and combined output for validation or debugging. No network access.

Instructions

Run a shell command from the repository root inside a session's sandbox. Returns the exit code and combined stdout/stderr, truncated in the middle if very long. No network access.

Input Schema

NameRequiredDescriptionDefault
commandYesShell command, run with sh -c
timeout_sNoKill the command after this many seconds
session_idYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4/5.0
Behavior4/5

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

Adds genuine behavior beyond annotations: the working directory (repository root), that stdout and stderr are combined, that output is truncated in the middle when long, and that there is no network access (consistent with openWorldHint=false). It does not cover what happens on timeout expiry beyond the schema's kill semantics, which keeps it from a 5.

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?

Three short sentences, front-loaded with the action and execution context, then return shape, then the network constraint. No redundant restatement of the title or name.

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?

With no output schema, the description carries the return-value burden well by naming exit code, combined stdout/stderr, and middle truncation. The main gap is the lifecycle relationship to start_session/end_session, which an agent would need to call this safely.

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 67% and the description does not compensate for the undocumented session_id: it never says where the id comes from or whether the session must be active. The 'repository root' phrasing does usefully constrain how the command executes, but the meaning of the remaining parameters comes entirely from 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 (run) plus resource (shell command) plus scope (from the repository root, inside a session's sandbox). None of the siblings (list_tasks, get_task, start_session, end_session, diagnose_ci) execute arbitrary commands, so an agent can distinguish it immediately without opening the schema.

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

Usage Guidelines3/5

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

Usage is only implied: the mention of 'a session's sandbox' hints that a session must already exist, but no explicit prerequisite, no when-to-use framing, and no routing away from siblings like diagnose_ci is given. The agent must infer the workflow context itself.

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