Skip to main content
Glama

Run a command in the sandbox

brij_sandbox_exec

Free over MCP (the x402 price quoted below applies to the HTTP API only; MCP calls are rate-limited instead). Long jobs: background: true, then brij_sandbox_logs.

Run a shell command in your sandbox

Free (the lease is paid). Runs cmd with bash in /workspace. Foreground: up to 60 s, answers stdout (≤1 MiB), stderr (≤256 KiB), exit_code; past the timeout: exit_code 124, timed_out. background: true starts it detached (up to the lease's end) and answers process_id + log: read it with POST /sandbox/logs. Multi-line scripts and heredocs are fine.

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": {
      "cmd": "<cmd>",
      "lease_token": "<lease_token>"
    },
    "name": "brij_sandbox_exec"
  }
}

Input Schema

NameRequiredDescriptionDefault
cmdYesShell command(s), ≤64 KiB.
timeout_sNoForeground ≤60 (default 30); background ≤ the lease's remaining time.
backgroundNoRun detached; poll POST /sandbox/logs.
lease_tokenYesThe lease_token returned by POST /sandbox/start (shown once). Also accepted as Authorization: Bearer.

Output Schema

NameRequiredDescriptionDefault
okNoThe sandbox answered.
logNoDetached command's log path, for /sandbox/logs.
stderrNoStandard error, ≤256 KiB.
stdoutNoStandard output, ≤1 MiB.
exit_codeNoThe command's exit code (124: timed out).
timed_outNoTrue when the foreground limit cut it.
backgroundNoTrue for a detached command.
process_idNoDetached command's id, for /sandbox/logs.
duration_msNoRun time.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4/5.0
Behavior4/5

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

Goes well past the annotations by disclosing hard limits: 60 s foreground cap, stdout ≤1 MiB, stderr ≤256 KiB, exit_code 124 plus a timed_out flag past the deadline, and detached execution bounded by the lease's end. It does not contradict destructiveHint=false, though it never explains whether shell side-effects inside the sandbox persist or are discarded.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The core content is front-loaded and useful, but the opening pricing sentence and the later orphan "Free (the lease is paid)" fragment repeat the same billing point twice and push operational detail into the middle. Referencing HTTP-style paths ("POST /sandbox/logs") next to the MCP tool name adds avoidable noise.

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?

For a four-parameter, output-schema-backed exec tool this is largely complete: execution mode, limits, exit semantics, and the logs follow-up are all covered. The gaps are whether the workspace persists between calls and the ambiguity between the brij_sandbox_logs tool and the "POST /sandbox/logs" endpoint reference.

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 each parameter is already documented; the description only reinforces the background/timeout relationship ("background ≤ the lease's remaining time"). That is a mild addition over structured data, so the baseline 3 fits.

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 ("Run a shell command in your sandbox") and immediately constrains the executor ("Runs cmd with bash in /workspace"). It also names the follow-up sibling brij_sandbox_logs for long jobs, so an agent can distinguish it from log/file/lease tools without opening a 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?

Gives a clear decision rule between the two modes: foreground up to 60 s for quick commands, "Long jobs: background: true, then brij_sandbox_logs." It does not state preconditions explicitly in the description (that a live lease from sandbox start is required), though the parameter schema carries that.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources