Skip to main content
Glama

code_sandbox_tool

Execute short code snippets in a secure, deterministic sandbox with resource limits and sub-50ms response times. Provide input data and optional parameters to get fast, isolated results.

Instructions

    [Cost: $0.005 USDC on Base & Solana] Safe deterministic sandbox for executing short code snippets with resource limits.
    Sub-50ms deterministic machine execution.

    Args:
        input_data: Target payload or query string.
        parameters: Optional dictionary or JSON string of execution arguments.
        payment_signature: Optional x402 Base USDC transaction hash (defaults to developer mock key).
    

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
input_dataYes
parametersNo
payment_signatureNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.3.0

TDQS

B3.1/5.0
Behavior3/5

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

No annotations are provided, so the description carries the full burden. It discloses cost ($0.005), safety, determinism, sub-50ms execution, and mentions payment_signature. It does not describe what happens on error, the return format, or isolation details. While it adds some behavioral context (payment requirement, determinism), it is not comprehensive for a sandbox execution tool with no annotations.

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 short and front-loaded with cost and key attributes. It lists parameters with brief explanations. It avoids fluff and is efficient, though it could be slightly more structured. It earns a 4 for being concise and to the point, but not a 5 because it lacks some detail that would make it more useful.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/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, payment, resource limits) and no output schema, the description is inadequate. It does not specify supported languages, limits of 'short', how to structure input_data, expected output format, or error behavior. The absence of any output schema means the description must cover return values, which it does not. This leaves significant gaps for an agent to use the tool correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must compensate. It provides brief explanations: input_data is a 'payload or query string', parameters is a 'dictionary or JSON string', payment_signature is an 'x402 Base USDC transaction hash'. However, these are insufficient for an agent to know exactly what to pass; e.g., what constitutes a valid payload, what execution arguments are expected, and the format of the signature are unclear. The description only partially compensates for the lack of schema documentation.

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 states a clear purpose: 'executing short code snippets with resource limits' in a 'safe deterministic sandbox'. It identifies the specific action (executing code) and the resource (sandbox). However, it does not differentiate from any sibling tool; no alternative is mentioned. The mention of sub-50ms determinism adds specificity but the lack of sibling comparison keeps it from a 5.

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 for short code execution and emphasizes safety and determinism, giving a clear context. It does not state when not to use this tool or name alternative tools. The constraint 'short code snippets' and 'resource limits' suggests applicability but no explicit exclusions or alternatives are provided, so it is implied rather than explicit.

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