MCP server for executing Python code snippets with batch parallel execution support
Two tools with complete input schemas and reasonable descriptions. run_python and run_python_batch both have verb-noun naming and document their purpose, timeout, and cwd parameters. However, descriptions lack LLM-optimized guidance on WHEN to use each tool (the distinction is stated but not emphasized). Parameter descriptions are present but generic, 'Python code snippet' doesn't explain constraints like the 1MB limit or 60s timeout enforcement. Output schemas are not documented; LLMs cannot predict the structure of stdout/stderr/exit_code responses. Error handling is minimal, timeout errors are caught but recovery guidance is absent. Helper utilities (chunk_by_count, chunk_by_size, suggest_batch_size) are well-documented but are utility functions, not tools, so they don't factor into tool quality scoring.
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.
Execute multiple Python code snippets in parallel using ProcessPoolExecutor. Each snippet runs independently in its own process. Use for embarrassingly parallel tasks. Max 1MB per snippet, 60s timeout per snippet, 4 max workers.
Output schema not documented. LLMs cannot predict the structure of responses (stdout, stderr, exit_code, success, executable fields). This forces agents to guess at response shape and risks parsing failures.
Error handling lacks recovery guidance. TimeoutExpired and other exceptions return partial output but do not tell the LLM what to do next (retry with longer timeout? split code into smaller chunks?). Bare error messages provide no actionable path forward.
Parameter descriptions are generic and lack constraint details. 'Python code snippet to execute' does not mention the 1MB size limit or 60s timeout enforcement. LLMs cannot self-correct if they pass oversized code without explicit constraints in the description.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-23 | D | 58 | 2026-07-28+ | v2 |
Distinction between run_python and run_python_batch is stated in descriptions but not emphasized. LLMs may conflate the two or choose incorrectly. Description should explicitly state: 'Use run_python for sequential/stateful code. Use run_python_batch ONLY for embarrassingly parallel, independent tasks.'
No tool annotations (readOnlyHint, destructiveHint, idempotentHint). Both tools execute arbitrary code and have irreversible side effects (file writes, network calls, system state changes). Marking them with destructiveHint=true would signal to agents that these are high-risk operations requiring caution.