Skip to main content
Glama

sandbox_build

Destructive

Run a build step and reuse its output: the same inputs (dir contents, cmd, env, toolchain versions) restore the previous result instead of compiling again. Suited to npm ci, go build or next build, e.g. {dir: "app", cmd: "npm ci", out: ["node_modules"]}; reused=true means nothing compiled, cached=true means this run's output was saved for later boxes. For an install step alone (npm ci, pnpm install, yarn) whose out is only node_modules, the version field of the package.json and package-lock.json at the top of dir is left out of the fingerprint, so a version bump still reuses it.

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>",
      "dir": "<dir>",
      "cmd": "<cmd>",
      "out": "<out>",
      "note": "<note>"
    },
    "name": "sandbox_build"
  }
}

Input Schema

NameRequiredDescriptionDefault
idYes
cmdYesRun with bash inside dir
dirYesDirectory to build in, relative to /work: app for /work/app (an absolute /work/app works too)
envNoPart of the fingerprint
outYesPaths the build produces, relative to dir: ["dist"], ["node_modules"] or ["bin/app"] (an absolute path inside dir, /work/app/dist, works too); restored on a hit
noteYesOne short sentence, in the language requested by the person (English by default), saying what this build is for; the person watching sees it in their app instead of the raw command. It stays on the box's timeline for 7 days, shown to everyone who opens the box: if you will hand it to someone who reads another language, write it in theirs
excludeNoPaths relative to dir left out of the fingerprint, e.g. ["src"] for an install step that does not read your sources, so editing them does not force a reinstall
noCacheNoBuild anyway, replace the stored output
timeoutSecNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.7/5.0
Behavior3/5

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

Annotations already declare destructiveHint=true and openWorldHint=true, and the description adds genuinely useful behavior: fingerprint composition, the meaning of reused/cached, and the 7-day note retention. It does not disclose that out paths are overwritten/restored on a hit or what happens when a build fails, which matters for a destructive tool.

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?

Front-loaded with the core contract, but the second and third sentences are long run-ons packing fingerprint exceptions and flag semantics together. Dense rather than wasteful, yet harder to parse than it needs to be.

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 tool with no output schema and non-trivial caching semantics, the description covers the essential mental model and the install-step exception. Gaps remain around id, timeoutSec, and failure behavior, but nothing critical to a correct first call is missing.

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?

Adds real meaning beyond the 78%-covered schema: env is part of the fingerprint, out is restored on a hit, exclude removes paths from the fingerprint, and note is a human-facing 7-day timeline entry with a language rule. id and timeoutSec remain unexplained in both places.

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?

States a specific verb and resource ('Run a build step and reuse its output') and immediately explains the caching contract, which separates it from a plain command runner like sandbox_exec. It never names the sibling it is not, so differentiation is inferred rather than stated.

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 concrete when-to-use examples (npm ci, go build, next build) and a precise carve-out for install-only steps whose out is node_modules. It does not say when to prefer sandbox_exec instead of a build step, leaving that boundary implicit.

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.