Skip to main content
Glama
302ai

302AI Sandbox MCP Server

by 302ai

runCode

Execute code in a secure sandbox environment with specified language and environment variables. Retrieve text output directly; for file operations, use dedicated viewing and export endpoints.

Instructions

Run code on a specific sandbox. This returns text output only. For operations that generate files, you'll need to use separate file viewing and export endpoints. Default file saving path is /home/user.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
codeYesThe code to run
envsNoEnvironment variables to set when running the code
languageNoThe programming language to use. If not specified or if the value is not in the allowed range, it will be treated as Python code.python
sandbox_idYesThe ID of the sandbox to run the code on
timeoutNoThe timeout for code execution in seconds
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 adds useful context about text-only output and file handling, but doesn't cover critical aspects like permissions, error handling, rate limits, or whether this is a read/write operation. The description doesn't contradict annotations, but it's incomplete for a tool that executes code in a sandbox.

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?

The description is appropriately sized with three sentences that are front-loaded with the core purpose. Each sentence adds value: the first states the action, the second clarifies output limitations, and the third provides default path information. There's minimal waste, though it could be slightly more structured.

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 complexity of running code in a sandbox, no annotations, and no output schema, the description is moderately complete. It covers purpose and output type but lacks details on return values, error conditions, or integration with sibling tools. It's adequate as a minimum viable description but has clear gaps for effective tool selection.

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%, so the schema already documents all 5 parameters thoroughly. The description doesn't add any parameter-specific information beyond what's in the schema, such as explaining the 'sandbox_id' context or 'code' format. This meets the baseline of 3 for high schema coverage without additional value.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('Run code') and target resource ('on a specific sandbox'), which provides a specific verb+resource combination. However, it doesn't explicitly distinguish this tool from sibling tools like 'directRunCode' or 'runCommand', which appear to have similar functions, so it misses full sibling differentiation.

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?

The description implies usage by mentioning 'text output only' and referring to separate endpoints for file operations, which provides some context. However, it lacks explicit guidance on when to use this tool versus alternatives like 'directRunCode' or 'runCommand', and doesn't specify prerequisites or exclusions, leaving the agent to infer usage scenarios.

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