A simple MCP server that performs mathematical calculations using Python expressions
Single tool 'calculator' has critical definition gaps. Tool name lacks action verb (should be 'evaluate_expression' or 'compute_math'). Description contains typo ('mathamatical') and is vague about when to use it vs other tools. Input schema present but parameter description is minimal (15 chars). No output schema documented. No error handling guidance. Tool uses eval() which is a severe security risk not addressed in the definition.
For mathamatical calculation, always use this tool to calculate the result of a python expression. You can use 'math' or 'random' directly, without 'import'.
Tool name 'calculator' lacks action verb. Should be 'evaluate_expression', 'compute_math', or 'calculate_expression' to signal intent to LLM.
Description contains typo ('mathamatical' → 'mathematical') and lacks clarity on when to use this tool vs alternatives. Does not explain what it returns or error conditions.
Input parameter 'python_expression' has minimal description (15 chars). Does not specify constraints (length limits, allowed functions, security boundaries). LLM cannot infer valid input format.
No output schema documented. Return type is dict with 'success' and 'result' fields, but LLM has no visibility into structure, data types, or what 'result' contains (number, string, list, error message?).
Inferred effective spec: <=2025-11-25.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-23 | F | 33 | <=2025-11-25 | v2 |
Tool uses eval() with minimal sandboxing (only math and random in scope). No error handling guidance for invalid expressions, division by zero, or infinite loops. LLM cannot recover from failures.