Skip to main content
Glama
neu-sandbox-mcp

neu-sandbox-mcp

Official
by neutree-ai

Run Command in Sandbox

sandbox_run_command

Execute shell commands inside a sandbox and capture stdout, stderr, exit code, and execution time. Use background mode for long-running processes and follow with logs/status tools.

Instructions

Execute a shell command inside a sandbox. Returns stdout, stderr, exit_code, and execution_time_ms. By default this blocks until the command exits. For anything long-running (dev servers, builds, watchers) pass background: true — it returns a command_id immediately. Follow it with sandbox_get_command_logs / sandbox_get_command_status and stop it with sandbox_interrupt_command.

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": {
      "sandbox_id": "<sandbox_id>",
      "command": "<command>"
    },
    "name": "sandbox_run_command"
  }
}

Input Schema

NameRequiredDescriptionDefault
cwdNoWorking directory for the command
envNoAdditional environment variables for this command
commandYesShell command to execute, e.g. "python3 -c 'print(1+1)'" or "ls -la /tmp"
backgroundNoReturn as soon as the command starts instead of waiting for it to exit. stdout/stderr come back empty; follow it with the returned command_id.
sandbox_idYesID of the target sandbox
timeout_secondsNoMax execution time in seconds

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.4/5.0
Behavior4/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 well: it discloses the return payload, the blocking-vs-background tradeoff, and that background mode returns empty stdout/stderr plus a command_id. Gaps remain for a mutation-capable tool — nothing about default timeout_seconds, whether state (cwd, files, env) persists across calls, or what happens on non-zero exit.

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?

Four short sentences, front-loaded with purpose and return shape before the branching guidance. Every sentence contributes a distinct fact (what it does, what it returns, default behavior, long-running escape hatch and follow-ups) with no filler.

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?

No output schema exists, and the description compensates by describing the return fields and the command_id workflow for background mode. For a six-parameter execution tool lacking annotations, it is nearly complete; only timeout defaults and failure semantics are unaddressed.

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 100%, so all six parameters are already documented, and the description's background guidance largely restates the schema's own wording about returning early with empty stdout/stderr. Baseline 3 applies since the description adds little parameter meaning beyond the structured fields.

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 and resource ("Execute a shell command inside a sandbox") and immediately enumerates the return fields (stdout, stderr, exit_code, execution_time_ms), which no sibling tool produces. It is clearly distinguishable from the adjacent log/status/interrupt tools it names.

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 defines the decision rule: default blocking behavior for normal commands, and "For anything long-running (dev servers, builds, watchers) pass background: true." It also names the concrete follow-up path (sandbox_get_command_logs / sandbox_get_command_status) and the termination path (sandbox_interrupt_command), so no inference is required.

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