Skip to main content
Glama
neco001

Python Executor MCP Server

by neco001

run_python

Execute a single Python code snippet for stateful or dependent operations. Set working directory and timeout for each run.

Instructions

Execute a single Python code snippet. Use for stateful/dependent operations. Use run_python_batch for parallel independent tasks. Max 1MB code, 60s timeout. See README.md for usage examples and helper utilities.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
cwdNo
codeYes
timeoutNo
Behavior4/5

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

With no annotations, the description must carry the full burden. It discloses limits (1MB code, 60s timeout) and the stateful nature of execution, adding valuable context beyond the schema. However, it doesn't mention side effects, return format, or environment specifics, which would be expected for complete transparency.

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 three sentences, front-loaded with the primary action, then usage context, then constraints and reference. Every sentence earns its place with no redundancy.

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?

The tool has no output schema and no annotations, so the description must compensate. It provides essential usage and constraints, and points to README for more details, but omits return value behavior and other environmental context. The pointer to README assigns completeness, but the description itself is not fully self-contained.

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 should explain the parameters. It mentions the code size limit and timeout constraint, but does not clarify the meaning of the 'cwd' parameter or describe the semantics of each field beyond what the schema titles already imply. This is insufficient given the lack of schema-level descriptions.

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+resource: 'Execute a single Python code snippet.' It also distinguishes itself from the sibling tool by specifying 'Use for stateful/dependent operations' vs. 'run_python_batch for parallel independent tasks.'

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?

Explicitly provides when-to-use guidance ('Use for stateful/dependent operations') and names the alternative ('Use run_python_batch for parallel independent tasks'). Also states constraints (Max 1MB code, 60s timeout) and points to README for examples.

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/neco001/py_executor'

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