Skip to main content
Glama

Fork sandbox

fork_sandbox

Duplicate an existing sandbox into a new independent fork while leaving the source unmodified. Override size, environment, network policy, or TTL, and retry safely with an idempotency key.

Instructions

Fork sandbox. Provision a new sandbox from an existing one. Send an Idempotency-Key header to make this call safe to retry after a lost response without creating a second billable fork.

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

Input Schema

NameRequiredDescriptionDefault
envNoReplaces the env the fork would otherwise inherit from the source sandbox. Same validation rules as `CreateSandboxRequest.env`.
typeNoMachine size for the fork. Omit to inherit the source sandbox's type. `xlarge` needs the $100/month plan or higher (403 `machine_class_plan_required`). The source sandbox is never modified. Shrinking is rejected with `type_too_small` when the source's data would not fit the smaller disk.
noEnvNoMake the fork no-env (see `CreateSandboxRequest.noEnv`). A fork of a no-env sandbox is always no-env regardless of this field.
labelsNoLabels of the fork. The fork never takes the source's labels. Same rules as `CreateSandboxRequest.labels`.
networkNoWhat the sandbox may connect to. Send `mode`, `inbound` or both: at least one. The side that the request does not name stays as it is. `inbound` and `inboundAllow` are one side. A sandbox that sets one side has its own policy and no longer follows its environment; `mode: environment` makes it follow again. On create, omitted means the policy of its environment; with `from`, the policy that the saved snapshot's sandbox had. On fork, omitted means what the source sandbox has. An API key without the `network.write` action always gets the policy that the sandbox would have without this field, a tighter one included: any other value is refused with 403 `api_key_action_forbidden`. A bad policy is refused with 400 `invalid_network_policy`. When no host can enforce a policy now, create and fork answer 409 `network_policy_unsupported`. A CI runner is always `open` and follows no environment.
failFastNoPass `true` to fork only if a machine is ready right now. Within about 1.5 s you get the usual `202`, or `503` `no_ready_machine` with no fork created and nothing counted against your start limits.
sandboxIdYesPublic Sandbox id returned by create/list/get sandbox calls.
monitoringNo`false` creates the fork with monitoring off: Boat keeps no command or process output, process list or CPU/RAM samples for it. Omitted, the fork keeps the source sandbox's setting. `true` turns it on for the fork, unless the account has monitoring off by default (`409` `monitoring_off_for_account`).
ttlSecondsNoAuto-stop for the fork, in seconds. Omit for the 1 hour default; the fork does NOT inherit the source sandbox's TTL, so forking a sandbox that has auto-stop disabled still gives you a fork that stops itself. `null` disables auto-stop, which means nothing will ever stop this sandbox for you.
environmentNoOptionally pin the fork to a different named sandbox environment. Omit to inherit the source sandbox's environment. Unknown names are rejected with `unknown_environment`.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.0.0

TDQS

A3.8/5.0
Behavior4/5

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

The annotations already declare readOnlyHint=false, destructiveHint=false, openWorldHint=true, so the safety profile is partly covered. The description adds genuinely new context the annotations do not carry: the operation is billable and a retry can create a second billable fork unless an `Idempotency-Key` header is sent, which refines the flat idempotentHint=false. It stops short of describing the return (e.g., an async 202 with a new sandbox id).

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 purpose and followed by the retry-safety hint. The opening "Fork sandbox." merely restates the title and could be dropped, but everything else earns its place.

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 tool with a deeply nested network policy object and no output schema, the description covers purpose and retry semantics but says nothing about what comes back or the asynchronous nature of provisioning (e.g., a 202 and a new sandbox id, plus the failFast 503 path). The rich schema compensates for parameter detail, but return-shape expectations remain unset.

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% and the nested network/env/ttlSeconds fields are documented exhaustively in the schema, so the description correctly leaves parameters alone. It adds no meaning beyond the schema, which is the baseline expectation when the schema already does the work.

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?

The description states a specific verb and resource ("Fork sandbox") and immediately disambiguates from create_sandbox with "Provision a new sandbox from an existing one." An agent can tell this apart from plain sandbox creation without opening either schema.

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?

"From an existing one" implies the precondition (a source sandbox must exist), and the idempotency sentence tells the agent how to retry safely. But there is no explicit when-to-use-this-vs-create_sandbox guidance, no statement of when forking is inappropriate, and no mention of prerequisites such as source sandbox state.

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