Skip to main content
Glama
QuantumFabricIndustries

phantom-snare

execute_code

Execute code in a sandboxed environment and receive the output, isolating runs for security.

Instructions

Execute code in a sandboxed environment and return the output.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
codeYesThe code to execute.
languageNoProgramming language (python, javascript, bash)python

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv2.0.0

TDQS

A3.6/5.0
Behavior3/5

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

The description discloses that execution occurs in a sandboxed environment, which is a key safety trait, and that output is returned. However, with no annotations provided, the description bears full burden and does not cover error handling, side effects, or resource limits, leaving gaps for a code execution tool.

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 a single, front-loaded sentence with no redundant words. It efficiently communicates the core action and expected result.

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?

For a code execution tool with no annotations and no output schema, the description is too sparse. It omits crucial details such as error behavior, timeouts, environment persistence, or network access, which an agent would need to invoke it correctly and safely.

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 coverage is 100% for both parameters, and the description adds no additional semantic detail beyond what the schema already states. Baseline of 3 applies since the description does not enhance parameter understanding.

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 verb 'Execute', the resource 'code', and the environment 'sandboxed', which distinguishes it from siblings like read_file or write_file. It precisely conveys the tool's function without ambiguity.

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 running code but does not explicitly contrast it with alternatives or state when not to use it. Given the unique role among siblings, the usage is implied rather than explicitly guided.

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