Skip to main content
Glama

Run Command in Ephemeral Sandbox

sandbox_run

Create an ephemeral sandbox, execute a shell command, and retrieve the output—designed for quick one-off tasks like running scripts or testing code.

Instructions

Create an ephemeral sandbox, run a shell command, return the output, and destroy the sandbox. Best for quick one-off tasks like running a script, checking a command, or testing code.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
imageYesOCI image (e.g. "python:3.12", "node:22", "alpine")
commandYesShell command to execute
memoryMibNoMemory in MiB (default: 512)
cpusNoNumber of vCPUs (default: 1)
envNoEnvironment variables
Behavior4/5

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

The description adds context beyond annotations by explaining the full lifecycle (create, run, destroy) and that the sandbox is ephemeral. Annotations only show non-readOnly, non-destructive, and non-idempotent, which aligns with the description's intent.

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 description is two sentences, concise, and front-loaded with the core action. Every word adds value.

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?

The description explains the tool's purpose and lifecycle holistically. Given no output schema, it could mention that the output is returned as a single string, but the context is adequate for a combined operation tool.

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?

The schema covers all parameters with descriptions (100% coverage), so the description does not need to add detail. It adds no additional semantics but is sufficient.

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 clearly states it creates an ephemeral sandbox, runs a command, returns output, and destroys it. This distinguishes it from sibling tools that require separate create/exec steps, but does not explicitly mention those alternatives.

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?

The description says 'Best for quick one-off tasks' with examples, providing guidance on when to use. However, it does not specify when not to use this tool (e.g., for repeated commands, sandbox_shell might be better) or mention alternative tools.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/superradcompany/microsandbox-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server