Skip to main content
Glama

Open a sandbox with a coding agent

connect_sandbox

Open a recorded terminal connected to a sandbox and start Claude Code or Codex so users can work in it; stopped sandboxes start automatically.

Instructions

Open a new terminal on the user's machine, connected to a sandbox, with Claude Code or Codex starting in it (a stopped sandbox is started). The user works there, and that session is recorded. Use when the user asks to connect to, open or work in a sandbox.

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

Input Schema

NameRequiredDescriptionDefault
idYesA cloud sandbox's id (rtp-...), or a local sandbox's name, from list_sandboxes.
agentNoThe coding agent to start in the terminal: claude (Claude Code, the default) or codex (Codex). none opens a plain shell.
claudeNoOlder form: false is agent: "none".

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.9/5.0
Behavior4/5

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

Annotations already declare it is a non-read-only, non-destructive, non-idempotent, closed-world operation. The description adds real context beyond that: a terminal is opened on the user's machine, a stopped sandbox is auto-started, and the resulting session is recorded — details an agent could not derive 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.

Conciseness4/5

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

Three short sentences, front-loaded with the core action and ending with the usage trigger. 'The user works there' is mild filler, but nothing else is wasted.

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 3-parameter tool with a fully documented schema, full annotation coverage, and no output schema, the description covers the mechanics and side effects well. It would be stronger if it hinted at what the call returns (e.g., a terminal or session reference) now that the session is recorded.

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

Parameters3/5

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

Schema description coverage is 100%, so the id, agent enum, and legacy claude flag are already documented in the schema. The description only echoes the agent choice (Claude Code or Codex) and adds nothing about the id format or the older claude parameter, so baseline 3 applies.

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 names a concrete verb and resource: it opens a new terminal on the user's machine, connects it to a sandbox, and launches a coding agent inside. It also distinguishes itself implicitly from start_sandbox by noting a stopped sandbox is started as a side effect, though it never names a sibling explicitly.

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?

It gives an explicit trigger: 'Use when the user asks to connect to, open or work in a sandbox.' That is clear positive guidance, but there are no exclusions (e.g., when to prefer start_sandbox or run_command instead), so an agent must still infer the boundaries.

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