Create sandbox
sandbox_createCreates a billed Firecracker microVM in a chosen project for isolated code execution and returns its ID, with template, size, snapshot, volume, and lifetime options.
Instructions
Create a sandbox (a Firecracker microVM) in an explicit project. Uses billed cloud resources and returns its ID. Defaults: template interpreter, size small (2 vCPU / 4 GB), a 5-minute lifetime; expiry deletes its files unless a volume is attached. Other templates: base, codex, claude, opencode, pi, prime, desktop (the server checks the name). Sizes: small, medium (4 vCPU / 8 GB), large (8 vCPU / 16 GB). Pass snapshotId to start from a saved snapshot (it keeps the snapshot's size, so leave size out) and volume to mount a persistent volume. No host files, environment variables, or API key are copied into it. Get the user's approval before creating it; do not retry an uncertain response blindly.
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": {
"project": "<project>",
"confirm": "<confirm>"
},
"name": "sandbox_create"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| size | No | Default small; not with snapshotId | |
| region | No | Region code (region_list); default us-east-1, or the volume's or snapshot's region | |
| volume | No | Persistent volume name or ID in the same project (volume_list) | |
| confirm | Yes | ||
| project | Yes | ||
| template | No | Template name; default interpreter | |
| lifetimeMs | No | Lifetime in ms, 60,000 to 86,400,000 (a day); extend later with sandbox_set_timeout | |
| snapshotId | No | Snapshot ID from sandbox_snapshot or sandbox_snapshot_list |