MCP Server for Python Code Execution. Exposes tools that execute Python files and return their output. Adapted from LaTeX compilation agent but uses Python execution instead.
The server implements 2 tools with reasonable descriptions and basic input validation. Naming follows action-verb conventions (run_python, list_python_files). However, several critical issues reduce quality: (1) Tool descriptions lack guidance on when to use them vs alternatives; (2) Parameter descriptions are present but sparse, lacking format/constraint details; (3) Output schemas are undocumented, the server returns plain strings with no structured format specification; (4) Error handling is basic (returns error strings) but lacks recovery guidance or actionable next steps; (5) No tool annotations (readOnlyHint, destructiveHint, idempotentHint) despite run_python being WRITE-heavy; (6) Security model is present (path validation, directory containment checks) but not formalized in tool documentation. Baselines: avg tool description length is 194 chars, both tools are ~180 - 220 chars (reasonable). Params average 72 chars per annotation, descriptions here are 40 - 60 chars (thin but present). Output schemas are MISSING entirely (critical gap for LLM planning).
List all Python files in a directory.
Execute a Python file and return its output (stdout and stderr). This tool runs a Python script in a subprocess and captures all output. It's useful for testing Python code, running scripts, and debugging.
No documented output schemas. Both tools return plain strings with no structured format specification. LLMs cannot plan downstream tool calls or extract structured data when output format is undocumented.
Missing tool annotations for destructive operations. run_python modifies state (WRITE risk: executes arbitrary code) but lacks destructiveHint annotation. Agents cannot distinguish safe reads (list_python_files) from risky writes (run_python).
Error responses lack recovery guidance. Errors return plain text messages ('Error: File not found', 'Error: Access denied') with no suggestions for next steps. Per pattern:recovery-guide, error responses must tell the LLM what to do: 'File not found. Try list_python_files() to see available scripts.'
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-22 | F | 49 | 2026-07-28+ | v2 |
| 2026-03-09 | F | 45 | - | v1 |
Parameter descriptions lack format/constraint details. run_python's file_name param says 'Path to the Python file' but does not specify: allowed relative paths, how resolution works, absolute path handling. list_python_files' directory param mentions 'optional' but lacks detail on behavior when None is passed.
No pagination or result limits documented for list_python_files. If a directory contains thousands of .py files (e.g., virtual env with site-packages), the response could be huge and blow the context window. Pattern:paginated-result requires limit/offset + total count.
No dry-run or confirmation step for destructive operations. run_python executes arbitrary Python code (WRITE risk). Per pattern:confirmation-request, irreversible operations should support confirmation. Agents may execute dangerous scripts without intent verification.