Skip to main content
Glama
aazizisoufiane

mcp-python-repl

repl_run_file

Execute a Python file in a persistent REPL session, preserving its variables for later use.

Instructions

Execute a Python file inside the persistent session.

Variables defined in the file become available for later use.

Args: params: File path, optional session ID, and optional CLI args.

Returns: JSON with execution result, file metadata, and namespace summary.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
paramsYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/5

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

Annotations already indicate readOnly=false and openWorld=true, but the description adds meaningful context beyond that: execution occurs in a persistent session, variables persist for later use, and the return payload includes execution result, file metadata, and namespace summary. These are behavioral details not captured by annotations.

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 compact and well-structured. It opens with a clear purpose sentence, followed by a note on side effects, then concise Args and Returns summaries. Every sentence adds value with no redundancy or filler.

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

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given that an output schema exists and annotations provide safety hints, the description covers essential behavioral aspects: persistent session, variable persistence, and return structure. It does not mention error handling or edge cases, but those are not required given the richness of schema and annotations. The description is sufficiently complete for an AI agent to use correctly.

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?

The input schema already provides detailed descriptions for file_path, session_id, and args (path type, session ID to resume, space-separated CLI args). The tool description's 'Args' line only restates the parameter names without adding new semantics. Since schema coverage is effectively complete, a baseline score of 3 is appropriate.

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?

Description uses the specific verb 'Execute' with the resource 'Python file', and clarifies the context 'persistent session'. It also notes a key side effect ('Variables defined in the file become available for later use'), which distinguishes it from sibling repl_run_code that likely runs inline code. This is a clear, specific statement of purpose.

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 this tool is for running files rather than ad-hoc code, but it does not explicitly name alternatives or state when to use this tool over repl_run_code. There is no exclusion or comparison, so usage guidance remains 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.

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

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