Skip to main content
Glama
Drahoxx

python-runner

by Drahoxx

run_script

Execute Python code in a subprocess with timeout control, returning stdout, stderr, and exit code for debugging.

Instructions

Execute Python code and return the result.

Args: code: Python code to execute timeout: Execution timeout in seconds (default: 30)

Returns: JSON string with success, stdout, stderr, error, and return_code

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
codeYes
timeoutNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior2/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 the return format (success, stdout, stderr, error, return_code) and the timeout default, but does not mention side effects, security implications, sandboxing, or restrictions on the executed code. For arbitrary code execution, this is a significant gap.

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 efficient, containing only a purpose statement, an Args section, and a Returns section. It is well-structured and front-loaded with the main verb phrase, with no 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?

For a tool with two parameters and a clear return contract, the description is reasonably complete. However, it lacks usage guidelines, behavioral caveats, and examples, which are important for a code execution tool with no annotations. The return format is described, but the absence of any mention of execution environment or safety considerations makes it less complete than ideal.

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

Parameters4/5

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

With 0% schema description coverage, the description compensates by explicitly listing parameters with concise explanations: 'Python code to execute' and 'Execution timeout in seconds (default: 30)'. This adds meaning beyond the bare property names and types.

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 executes Python code and returns a result, using the specific verb 'execute' and resource 'Python code'. It is distinct and unambiguous, despite having no sibling tools to differentiate from.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives, nor does it mention any prerequisites or context for invocation. Since there are no sibling tools, this is not critical, but the absence of any usage context means the agent must infer suitability from the purpose alone.

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

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/Drahoxx/python-mcp'

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