302AI Sandbox MCP Server

Official

createSandbox

Set up a Linux sandbox to execute code, run commands, and manage files. Create a sandbox with custom settings, obtain a sandbox_id for operations, and control costs by pausing automatically after use.

Instructions

Create a Linux sandbox that can execute code, run commands, upload and download files, and has complete Linux functionality. After successful creation, a sandbox_id will be returned, and all subsequent operations will need to include this sandbox_id to specify the corresponding sandbox. Except for directRunCode, all other operations require the creation of a sandbox first. After successful creation, the sandbox will automatically pause. When calling other sandbox operation interfaces later, it will automatically reconnect and pause again after execution to avoid generating extra costs.

Input Schema

NameRequiredDescriptionDefault
envsNoEnvironment variables to set (optional)
max_alive_timeYesMaximum alive time of the sandbox (seconds), recommand 300.
metadataNoSandbox metadata (optional)
sandbox_nameNoCustom sandbox name (optional)

Input Schema (JSON Schema)

{ "$schema": "http://json-schema.org/draft-07/schema#", "additionalProperties": false, "properties": { "envs": { "additionalProperties": { "type": "string" }, "description": "Environment variables to set (optional)", "type": "object" }, "max_alive_time": { "description": "Maximum alive time of the sandbox (seconds), recommand 300.", "type": "integer" }, "metadata": { "additionalProperties": { "type": "string" }, "description": "Sandbox metadata (optional)", "type": "object" }, "sandbox_name": { "description": "Custom sandbox name (optional)", "type": "string" } }, "required": [ "max_alive_time" ], "type": "object" }

You must be authenticated.

Other Tools from 302AI Sandbox MCP Server

Related Tools

ID: n4r8aw20s4