Skip to main content
Glama

Run sandbox command

sandbox_exec
Destructive

Execute approved shell commands as root in an existing Lizard sandbox; cancellation, timeout, or request failure deletes the sandbox and files, while a nonzero exit code preserves it.

Instructions

Run a shell command inside an existing sandbox, as root. Requires the user's approval. Cancellation, timeout, or a failed command request destroys the whole sandbox and all its files to stop remote code. A nonzero command exit code preserves it. Use an ephemeral sandbox created for this task. Output is capped at 64 KiB per stream; do not blindly retry a failed command.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
cwdNo/workspace
commandYes
confirmYesUser approved the command and loss of sandbox files if cancellation, timeout, or request failure requires cleanup
sandboxIdYesExact sandbox ID from sandbox_create or sandbox_list
timeoutMsNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.1.2

TDQS

A4.5/5.0
Behavior5/5

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

The description discloses behavior well beyond the annotations: the exact conditions that destroy the sandbox and all files (cancellation, timeout, failed command request), the fact that a nonzero exit code preserves it, the root privilege level, the user-approval requirement, and the 64 KiB per-stream output cap. These are precisely the destructive, irreversible consequences an agent must know before invoking.

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?

The purpose is front-loaded in the first clause, followed by tightly packed behavioral facts with no filler. Every sentence (destruction conditions, approval, ephemeral guidance, output cap, retry warning) carries decision-relevant information.

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 destructive, non-idempotent exec tool with no output schema, the description covers the safety profile, destruction triggers, privilege level, and output limits an agent needs to call it correctly. Nothing material is missing given the annotations are also consistent and supportive.

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 only 40% (sandboxId and confirm are documented in the schema; command, cwd, and timeoutMs are bare). The description explains the approval/failure consequence tied to confirm but adds nothing about cwd defaults, command format, or timeout behavior, so it does not fully compensate for the coverage gap. A 3 reflects the low-coverage baseline with partial compensation.

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 states a specific verb and resource ('Run a shell command inside an existing sandbox, as root'), and the word 'existing' implicitly separates it from sandbox_create while 'shell command' separates it from sandbox_read_file/sandbox_write_file. An agent can identify the operation 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 Guidelines4/5

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

It gives clear usage context: run against an existing sandbox and prefer an ephemeral sandbox created for the task, plus a caution not to blindly retry failures. It does not explicitly contrast with the closest alternative (ssh_exec) or state when-not to use this tool, so it falls short of a full when/when-not/alternatives treatment.

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