Skip to main content
Glama
302ai

302AI Sandbox MCP Server

by 302ai

directRunCode

Execute code in a temporary sandbox, automatically destroying it post-execution. Supports multiple languages, custom environment variables, and optional file download. Ideal for isolated, one-time code runs without persistent sandbox operations.

Instructions

Automatically creates a sandbox, executes code, and immediately destroys the sandbox after execution. Optionally exports sandbox files (compresses multiple files into a zip archive if there are multiple files in the specified path, or exports a single file directly). Recommended for use cases that don't require continuous sandbox operations.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
codeYesThe source code to be executed in the sandbox
envsNoEnvironment variables to be set during code execution. Supports passing custom environment variables as key-value pairs
is_downloadNoFlag to indicate whether to download generated files. Must be enabled if the code generates files that need to be retrieved
languageYesThe programming language to execute the code. If not provided or if the value is not in the allowed options, it will be treated as Python code
timeoutNoMaximum execution time in seconds for the sandbox. If code execution exceeds this time, it will be terminated and return a timeout error. Default is 5
Behavior3/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It does well by describing the sandbox lifecycle (creation, execution, destruction) and file export behavior (compression for multiple files). However, it lacks details on error handling, security implications, resource limits, or output format, which are critical for a code execution tool. The description adds value but doesn't fully compensate for the absence of annotations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is front-loaded with the core functionality in the first sentence, followed by optional features and usage guidance. Every sentence earns its place by adding distinct value: the first explains the main workflow, the second details file export behavior, and the third provides critical usage context. It's efficiently structured with zero wasted words.

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?

Given the tool's complexity (code execution with sandbox management) and the absence of both annotations and an output schema, the description is moderately complete. It covers the high-level workflow and key behavioral traits but lacks details on error responses, output structure, or security constraints. For a tool with no output schema and no annotations, more information would be beneficial to fully guide an agent.

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?

The schema description coverage is 100%, so the schema already documents all parameters thoroughly. The description adds marginal value by implying the 'is_download' parameter's purpose (exporting files) and contextualizing the tool's ephemeral nature, but it doesn't provide additional syntax, format, or usage details beyond what the schema specifies. This meets the baseline for high schema coverage.

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 clearly states the tool's purpose with specific verbs ('creates', 'executes', 'destroys') and resources ('sandbox', 'code'), and distinguishes it from sibling tools by emphasizing its single-use, ephemeral nature compared to continuous sandbox operations. It explicitly mentions the optional file export functionality, which further differentiates it from basic execution tools.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides explicit guidance on when to use this tool ('Recommended for use cases that don't require continuous sandbox operations'), which implicitly suggests alternatives like 'createSandbox' or 'runCode' for ongoing operations. It also clarifies the optional file export feature's purpose, helping users decide when to enable the 'is_download' parameter.

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

Install Server

Other Tools

Related Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/302ai/302_sandbox_mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server