Skip to main content
Glama

Destroy a sandbox

destroy_sandbox
DestructiveIdempotent

Delete a sandbox and its files, sign-in data, and optionally logs or traces. Use it to clean up local or cloud sandboxes, confirming first because removal cannot be undone.

Instructions

Delete a sandbox: its files and any sign-in made inside it. Cloud: its recorded traces are deleted too unless keep_traces is true, which only paid plans honour (traces then stay until the plan's retention date). Local: its captured logs are moved to ~/.raytrace/archive unless delete_logs is true. This cannot be undone; confirm with the user first.

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": "destroy_sandbox"
  }
}

Input Schema

NameRequiredDescriptionDefault
idYesA cloud sandbox's id (rtp-...), or a local sandbox's name, from list_sandboxes.
delete_logsNoLocal: delete the logs captured in the sandbox (its Claude Code sessions and recorded commands) instead of archiving them. Defaults to false.
keep_tracesNoCloud: keep the sandbox's recorded traces until the retention date (paid plans). Defaults to false.
upload_firstNoLocal: upload the sandbox's evidences to RayTrace cloud before deleting it (needs a sign-in). Defaults to false.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.1/5.0
Behavior5/5

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

Annotations already flag destructiveHint=true and openWorldHint=true, but the description goes well beyond them: it specifies per-platform effects (cloud traces deleted unless kept and only on paid plans, with retention-date nuance; local logs moved to ~/.raytrace/archive unless delete_logs), and states irreversibility. That is exactly the operational context an agent needs before invoking a destructive call, and it is consistent with the annotations.

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?

Three sentences, each doing distinct work: what is deleted, cloud behavior, local behavior, then the irreversibility warning. The most important constraint (cannot be undone) is placed last as a deliberate closing emphasis rather than buried, and there is no filler or restatement of the title.

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 4-parameter destructive tool with no output schema, the description covers both execution contexts and all three optional flags, so an agent can call it correctly. Minor gaps remain: no mention of what happens when the id does not exist or what the call returns on success, which would help an agent confirm completion after an irreversible action.

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 description coverage is already 100%, so the baseline is 3, but the description adds genuinely new meaning: keep_traces is effective only on paid plans (otherwise traces disappear now), and delete_logs switches between archiving and permanent deletion rather than simply toggling a flag. The upload_first/sign-in coupling is also echoed, though the sign-in requirement is repeated from the schema rather than extended.

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?

The description opens with a specific verb and resource ('Delete a sandbox') and immediately scopes what is removed: files, sign-ins made inside it, plus traces or logs depending on cloud vs local. The cloud/local split makes the blast radius unmistakable. It never names a sibling such as stop_sandbox, so an agent must infer the destructive-vs-suspend distinction from the description alone.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

There is a real usage directive — 'This cannot be undone; confirm with the user first' — and conditional guidance for keep_traces ('only paid plans honour') and upload_first ('needs a sign-in'). What is absent is when NOT to use this tool: nothing tells the agent to prefer stop_sandbox or connect_sandbox for reversible operations, which is the highest-risk routing decision for a destructive tool.

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