Create a sandbox
sandbox_createCreate an Alibaba Cloud Agent Sandbox and return its sandbox_id so it can be reused in later tool calls; configure TTL, template, env vars, and metadata, then kill it when finished.
Instructions
Create a new Alibaba Cloud Agent Sandbox (阿里云智能体沙箱) and return its sandbox_id. Keep the ID to reuse the sandbox in later tool calls, and call sandbox_kill when done. Defaults to the code-interpreter-v1 template with a 5 minute TTL.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "sandbox_create"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| envs | No | Environment variables injected into the sandbox. | |
| metadata | No | Free-form key/value metadata stored on the sandbox. | |
| template | No | Template name or ID. Defaults to E2B_TEMPLATE / code-interpreter-v1. | |
| timeout_ms | No | Sandbox TTL in milliseconds. Defaults to SANDBOX_TIMEOUT_MS (300000 = 5 minutes). |