A simple calculator MCP server that performs basic arithmetic operations
This calculator server has minimal but complete tool definitions. All 4 tools (add, sub, mul, div) are explicitly registered via @mcp.tool() decorator with proper JSON Schema input types (integer parameters with descriptions). However, descriptions are critically short (8-20 characters), parameter descriptions are minimal, output schemas are undocumented, and there is no error handling guidance. Tools lack depth of documentation expected for production agent tooling. The architecture is functional but does not follow Agentic Tool Patterns for LLM-facing descriptions or error recovery.
Add 2 numbers
Divide 2 numbers
Multiply 2 numbers
Subtract 2 numbers
Tool descriptions far below minimum effective length. 'Add 2 numbers' (14 chars) and 'Divide 2 numbers' (16 chars) are at the lower bound of acceptable (10 - 1024 char rubric baseline). Descriptions should be 50 - 200 characters to guide LLM tool selection and explain WHAT, WHEN, and any prerequisites. Current descriptions lack context for when to call each tool vs alternatives.
Output schema completely undocumented. Tools return tuples (result, operator_symbol) but the response structure is not formally defined. LLMs cannot plan downstream actions or extract values when return types are implicit. All production tools must document what fields and types are returned.
No error handling or recovery guidance. Division by zero (div tool) will crash with unhandled exception. No try-catch, validation, or error messages telling the LLM what went wrong or how to recover.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-22 | F | 43 | 2026-07-28+ | v2 |
| 2026-03-09 | F | 35 | - | v1 |
Tool names lack action verbs. 'add', 'sub', 'mul', 'div' are abbreviations/aliases, not verb_noun forms. Rubric baseline: '90% of A+ tools start with an action verb.' Better names: 'compute_sum', 'compute_difference', 'compute_product', 'compute_quotient' or 'add_numbers', 'subtract_numbers', etc. Current names are opaque for LLM discovery.
Parameter descriptions are present but minimal (e.g., 'First number', 'Second number'). Should include format hints, range constraints, or examples. Rubric: 'Describe the expected format, range, and allowed values directly in the parameter description.' E.g., 'First operand (integer, can be negative)' or 'First number (any integer)'.
No input validation. Parameters accept any integer; no bounds check. Unbounded numbers could cause overflow or timeout. Rubric: 'Specify minimum and maximum for numeric parameters (e.g. page_size 1 - 100, days 1 - 365).' Should document expected ranges, e.g., 'integers in range [-10^9, 10^9]'.