Skip to main content
Glama

Recover a sandbox that stopped responding

recover_sandbox

Power-cycle an unresponsive sandbox to restore responsiveness without touching its disk; it usually answers within 1-2 minutes and saves work automatically.

Instructions

Recover a sandbox that stopped responding. Power-cycle the machine of a sandbox that stopped answering. The disk is not touched. The sandbox usually answers again within 1-2 minutes and then saves your work by itself; sandbox.recovered fires when it does.

Refused with 409:

  • sandbox_is_reachable: the sandbox answers normally.

  • too_soon: a recover started less than 10 minutes ago.

  • no_machine: the sandbox has no machine. Resume it instead.

  • recover_unsupported: its machine cannot be power-cycled. Wait for it to answer, or stop it with {"force": true} and resume it from its last good snapshot. With no snapshot, a forced stop loses everything.

  • reset_failed: the power-cycle failed. Reply to the incident email.

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": {
      "sandboxId": "<sandboxId>"
    },
    "name": "recover_sandbox"
  }
}

Input Schema

NameRequiredDescriptionDefault
sandboxIdYesPublic Sandbox id returned by create/list/get sandbox calls.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.0.0

TDQS

A5/5.0
Behavior5/5

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

Annotations only carry the generic write/open-world profile; the description adds the recovery latency (1-2 minutes), the asynchronous `sandbox.recovered` event, the non-destructive disk guarantee, and the 10-minute cooldown implied by `too_soon`, which aligns with `idempotentHint: false`. The enumerated 409 refusals, including the data-loss warning when a forced stop has no snapshot, are behavior an agent cannot infer from structured fields.

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?

Front-loads the action and the safety guarantee in two short sentences, then switches to a scannable refusal bullet list. Each bullet maps a concrete error code to a decision the caller must make, so no line is filler.

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?

With no output schema, the description still covers what an agent needs: recovery timeline, the completion signal, failure modes, and recovery paths. For a one-parameter administrative action, nothing material is left unexplained.

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

Parameters5/5

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

Single-parameter tool with 100% schema description coverage, including a regex pattern and provenance note ('Public Sandbox id returned by create/list/get sandbox calls'). The description's mention of 'the sandbox' and the refusal codes referencing sandbox state adds compatible context without contradicting the schema, so a 5 reflects adequate alignment, though it adds little beyond the schema itself.

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 ('Recover a sandbox that stopped responding') and immediately scopes the mechanism as an out-of-band power-cycle ('Power-cycle the machine') rather than a restore, with the reassuring boundary 'The disk is not touched.' This distinguishes it from data-level operations like resume or stop.

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 says when not to use it: `sandbox_is_reachable` (answers normally), `too_soon` (within 10 minutes), and `no_machine` ('Resume it instead'). It also gives a fallback path for `recover_unsupported` and `reset_failed`, so the agent knows the alternative actions.

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