Skip to main content
Glama

get_sandbox

Read-only

Get a sandbox: its state (starting, ready, stopping, stopped or failed) and, while it's ready, a fresh cdp_url. While it's starting, it waits up to 45 seconds for it to be ready before answering, with wait over REST and always over MCP: if it's still starting, call again right away, with no pause.

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>"
    },
    "name": "get_sandbox"
  }
}

Input Schema

NameRequiredDescriptionDefault
waitNoAnswer once it's ready (or failed), waiting up to 45 seconds, instead of at once.
sandbox_idYesThe sandbox, `sbx_…`.

Output Schema

NameRequiredDescriptionDefault
idYes`sbx_…`.
errorNoWhy it failed.
stateYes`starting`, `ready`, `stopping`, `stopped` or `failed`.
folderYesThe folder its recordings and screenshots go in.
regionYesThe region it runs in.
cdp_urlNoWhile it's ready: the browser's DevTools websocket, for Playwright's `connectOverCDP`, Puppeteer's `connect` or any CDP client. It opens connections until `cdp_url_expires_at`; a connection stays open until the sandbox stops. Get the sandbox again for a fresh one.
timeoutYesSeconds it runs before it stops itself.
viewportYesThe browser window.
created_atYesRFC 3339.
project_idYesThe project its recordings and screenshots go in.
started_atNoRFC 3339: when its browser was ready.
stopped_atNoRFC 3339.
stop_reasonNoOnce it's stopping: `requested` or `timeout`.
cdp_url_expires_atNoRFC 3339.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.9/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true, openWorldHint=false, destructiveHint=false, so the safety profile is covered. The description goes further by disclosing the up-to-45-second blocking behavior and the retry-immediately rule, which is valuable. It does not, however, say what happens to a previously issued cdp_url or whether the state can transition backward, and the phrasing 'with wait over REST and always over MCP' is ambiguous about scope.

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?

Two tight sentences with the returned values front-loaded ahead of the timing caveat, and no redundant restatement of the title. The clause 'with wait over REST and always over MCP' is compressed to the point of being hard to parse on first read.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

An output schema exists, so return shape need not be explained, and the description still names the state values and the conditional cdp_url inline. For a two-parameter read tool with full annotation coverage, nothing an agent needs before calling 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?

Schema coverage is 100%, so the baseline is 3. The description adds meaning the schema does not: it clarifies that over MCP the wait behavior is effectively always applied, so the wait parameter is not optional in practice there. That reconciliation of param to runtime behavior is the extra value that lifts it above baseline.

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?

Specific verb and resource: 'Get a sandbox: its state (starting, ready, stopping, stopped or failed) and, while it's ready, a fresh cdp_url.' An agent can tell this is a read of current state plus connection URL. It does not explicitly contrast itself with start_sandbox or stop_sandbox, which is the only missing piece for a 5.

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 concrete polling protocol: while starting it waits up to 45 seconds, and 'if it's still starting, call again right away, with no pause.' That is real when-to-use guidance for the retry loop. It stops short of naming start_sandbox/stop_sandbox as the alternatives for lifecycle changes.

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