Skip to main content
Glama

sandbox_procs

Destructive

List, wait for, or stop the background commands on a box (sandbox_exec with background); a foreground command's execId works as a bgId too, so a result lost with a dropped connection can still be fetched or waited for. Job operations are scoped to the returned bgId. stop ends the whole process group, including descendant processes. Use it instead of pkill -f or pgrep -f, which match every process whose command line contains the pattern, other jobs included. wait with until "ready" returns once a server is up (readyPort or readyLog). list shows each job's cpu and whether this conversation started it (mine), and the foreground commands running now. Commands survive a restart of the box's agent (boxd); one that ended meanwhile has exitCode -1 and an endReason. Calls count as use of the box.

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": {
      "id": "<id>"
    },
    "name": "sandbox_procs"
  }
}

Input Schema

NameRequiredDescriptionDefault
idYes
allNoWith list: include commands that have finished, with their exitCode and endReason
bgIdNoFrom sandbox_exec with background, or the execId of a foreground sandbox_exec (running, or finished: then result holds what that call returned); required for stop and wait. With list: only that command, running or not, with its logTail and the steps psbx-step recorded
untilNoFor wait: exit (default) waits for the command to end; ready returns as soon as its readyPort or readyLog condition holds (or it ends first), so you test a server once it is up instead of after a fixed sleep
actionNoDefault list: the background commands still running, oldest first, each with bgId, note, cmd, startedAt, cpu and mine (whether this conversation started it), plus foreground: the foreground commands running now. stop: end one by bgId, with the whole process group, so the node under an npx goes too. wait: block until one finishes, or with until "ready" until it is ready
readyLogNoFor wait: set or replace the job's readiness condition to a log line matching this regular expression, searched from the start of its log (implies until ready)
readyPortNoFor wait: set or replace the job's readiness condition to this port accepting connections (implies until ready); for a job started without one
tailBytesNoHow many bytes of the end of each log to return as logTail. list leaves logTail out unless bgId or tailBytes is given; stop, wait and list with bgId default to 4096
timeoutSecNoFor wait: give up waiting after this long and return it still running, default and maximum 600; over a remote connection from ChatGPT or Codex, which ends a tool call after about 5 minutes, at most about 270

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / timeoutSec / description
      Previous value: -"For wait: give up waiting after this long and return it still running, default and maximum 600"New value: +"For wait: give up waiting after this long and return it still running, default and maximum 600; over a remote connection from ChatGPT or Codex, which ends a tool call after about 5 minutes, at most about 270"
  2. First observed

TDQS

A4.7/5.0
Behavior5/5

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

Beyond the annotations (destructiveHint=true, readOnlyHint=false), the description discloses that stop kills the whole process group including descendants, that jobs survive a boxd restart and come back with exitCode -1 plus an endReason, that wait caps at 600s (about 270s over remote connections), and that calls count as use of the box. That is exactly the extra context annotations cannot carry.

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

Conciseness4/5

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

Front-loaded with the verb set and the sandbox_exec link, then per-action detail; nearly every clause carries information. It is dense and a couple of sentences (the execId-as-bgId aside) run long, but nothing is 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?

For a 9-parameter, no-output-schema, destructive tool this covers the important behavioral edges: process-group kill, readiness waiting, restart survival, and timeouts. What remains thin is the `id` parameter and any explicit statement of the return envelope for stop/wait.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is already 89%, so the baseline is 3; the description still adds meaning, clarifying that job operations are scoped to the returned bgId, how `until "ready"` interacts with readyPort/readyLog, and what list returns per job (cpu, mine, foreground). The required `id` parameter is never explained in the prose, which is the only real gap.

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?

"List, wait for, or stop the background commands on a box" names three specific verbs and the resource, and immediately anchors it to its producer ("sandbox_exec with background"). An agent can tell this apart from sandbox_exec or sandbox_stop without opening any schema.

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?

It gives explicit routing rules: use this instead of `pkill -f`/`pgrep -f` because those match unrelated jobs, use `until "ready"` instead of a fixed sleep, and use a foreground execId as a bgId to recover a result lost to a dropped connection. Each action (list/stop/wait) has a stated condition for use.

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.