A basic MCP server demonstrating arithmetic operations via HTTP
Single-tool server with solid naming and schema definition but moderate description gaps. The 'calculate' tool follows verb_noun naming (calculate) and includes a complete JSON Schema with typed parameters, enums, and required constraints. However, descriptions lack sufficient detail for LLM optimization, particularly the tool description (34 chars) falls below the 50-200 char production baseline, and parameter descriptions are minimal. Error handling is present (divide-by-zero check) but lacks actionable recovery guidance. Output schema is implicit (text format response) rather than explicitly documented. No parameter dependency documentation despite operation controlling field validity.
Perform basic arithmetic operations
Tool description too brief (34 chars vs 50-200 char production baseline). 'Perform basic arithmetic operations' lacks context about when to use this tool, what it returns, and operational intent.
Output schema not documented. Tool returns text via mcp.NewToolResultText() but callers cannot predict the exact format ('%.2f' decimal representation) without reading source. LLMs need explicit output schema.
Error handling provides raw message ('cannot divide by zero') without recovery guidance. Per pattern:recovery-guide, should suggest next steps: 'Cannot divide by zero. Use a non-zero divisor or try a different operation.'
Parameter 'operation' description incomplete: 'The operation to perform (add, subtract, etc.' is a sentence fragment and truncated. Should state the full constraint: 'The arithmetic operation: add, subtract, multiply, or divide. Multiplication and division take precedence in compound expressions.'
Inferred effective spec: <=2025-11-25.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-22 | D | 55 | <=2025-11-25 | v2 |
| 2026-03-09 | D | 52 | - | v1 |
No parameter dependency documentation. The tool handles all four operations identically for x and y, but if operation ever controlled which params apply (e.g., power operation needing an exponent), undocumented dependencies would cause silent misuse.