Skip to main content
Glama
PortPro-Technologies-Inc

MCP Python Interpreter

run_python_file

Execute a Python file with specified arguments and environment settings. Processes file paths, custom environments, and command-line inputs to return script results efficiently for development workflows.

Instructions

Execute a Python file and return the result.

Args:
    file_path: Path to the Python file to execute (relative to working directory or absolute if system access is enabled)
    environment: Name of the Python environment to use (default if custom path provided, otherwise system)
    arguments: List of command-line arguments to pass to the script

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
argumentsNo
environmentNodefault
file_pathYes
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 of behavioral disclosure. It states the tool executes a file and returns the result, but doesn't cover critical aspects like security implications (e.g., system access), error handling, execution timeouts, or output format. This leaves significant gaps for a tool that runs arbitrary code.

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 front-loaded with the core purpose in the first sentence, followed by a structured parameter list. It's appropriately sized with no redundant information, though the parameter explanations could be slightly more concise (e.g., by combining details).

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 complexity of executing Python files (involving security, dependencies, and output handling), no annotations, and no output schema, the description is incomplete. It lacks details on return values, error cases, execution limits, and how it differs from siblings like 'run_python_code', making it inadequate for safe and effective use.

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 well by explaining all three parameters: 'file_path' (path to the Python file), 'environment' (Python environment to use), and 'arguments' (command-line arguments). It adds meaningful context beyond the bare schema, such as relative vs. absolute paths and default behaviors.

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 tool's purpose with a specific verb ('Execute') and resource ('a Python file'), making it immediately understandable. However, it doesn't explicitly differentiate from sibling tools like 'run_python_code' (which might execute code directly rather than from a file), leaving room for improvement in sibling distinction.

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 specifying what the tool does, but doesn't provide explicit guidance on when to use this tool versus alternatives like 'run_python_code' or other siblings. It mentions parameters like 'environment' and 'arguments' which hint at context, but lacks clear when/when-not statements or named alternatives.

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/PortPro-Technologies-Inc/mcp-python-interpreter'

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