Skip to main content
Glama

Branch a sandbox

branch_sandbox

Create an isolated child sandbox from a parent, copying workspace and environment via copy-on-write and starting with a fresh home directory for safe, repeatable agent work.

Instructions

Create an isolated child sandbox branched from a parent sandbox (cloud or local). Clones /workspace and /opt/env via fast copy-on-write, starts with a fresh /home/node by default, and optionally inherits allowlisted agent auth, attenuated Git access (cloud), or the parent env profile (cloud).

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": {
      "parent": "<parent>"
    },
    "name": "branch_sandbox"
  }
}

Input Schema

NameRequiredDescriptionDefault
nameNoOptional name for the child sandbox.
sizeNoCloud sandbox size (defaults to parent size).
parentYesA cloud sandbox's id (rtp-...), or a local sandbox's name, from list_sandboxes.
env_profileNoCloud only: explicit org env profile (name or envp-... ID) to attach to the child.
inherit_envNoClone parent /opt/env into the child when present. Defaults to true.
inherit_gitNoCloud only: Git repository access inherited from parent (attenuated; never escalates above parent). Defaults to "none".
inherit_authNoCopy allowlisted Claude/Codex login files only (cloud: parent owner only). Defaults to false.
parent_turn_idNoOptional parent trace/turn ID to link in lineage metadata.
inherit_workspaceNoClone parent /workspace into the child. Defaults to true.
inherit_env_profileNoCloud only: inherit the parent sandbox env profile (re-checked against caller RBAC). Defaults to false.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv1.0.0

TDQS

A3.7/5.0
Behavior4/5

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

Goes well beyond the annotations by disclosing what is copied (/workspace, /opt/env via copy-on-write), what is intentionally fresh (/home/node), the security posture of auth inheritance ('allowlisted ... parent owner only'), and that Git access is 'attenuated; never escalates above parent'. The main gap is lifecycle: it does not say whether the child persists, when to destroy it, or what the call returns.

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?

A single tight sentence with the resource and branch semantics front-loaded; every clause carries information. It is dense to the point of being slightly hard to scan, with the optional inheritance behaviors packed into one trailing clause.

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

Completeness3/5

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

For a 10-parameter creation tool with no output schema, the description explains the mutation's effects well but says nothing about the result (child id/name) or whether the child must then be started or connected via siblings like start_sandbox/connect_sandbox — information the agent needs to proceed after the call.

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 schema already defines every parameter, but the description adds real meaning: it clarifies the default clone behavior for /workspace and /opt/env, the fresh /home/node, and the attenuation rule behind inherit_git that the enum alone does not convey.

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: 'Create an isolated child sandbox branched from a parent sandbox (cloud or local).' That distinguishes it from a from-scratch create_sandbox by emphasizing the parent-branch relationship, but it never names the sibling, so an agent must infer the boundary.

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?

Usage is implied rather than stated: 'branched from a parent sandbox' plus the 'cloud or local' scope tells the agent when this applies, but there is no explicit when-not or pointer to create_sandbox for a non-branched sandbox.

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