A simple MCP server that provides calculator tools with basic arithmetic operations
The server implements two basic calculator tools with partial definition quality. Both tools have descriptions and Zod schemas visible in the source code (src/index.ts), but the descriptions are minimal (21-93 chars, within baseline but at the short end) and lack context about tool purpose, output format, and error handling. Parameter descriptions are present but terse. The 'add' tool is redundant given 'calculate' exists, violating the single-responsibility principle. Error handling in 'calculate' returns plain text for divide-by-zero but doesn't guide recovery or explain output schema structure. No tool annotations (readOnlyHint, idempotentHint) present despite both being READ_ONLY according to the risk metadata. The server is a minimal proof-of-concept rather than production-grade.
Simple addition tool
Calculator tool with multiple operations (add, subtract, multiply, divide)
Tool naming lacks clarity and purpose context. 'add' and 'calculate' are both generic; 'calculate' doesn't specify it's arithmetic-only. Names should start with a verb reflecting the action and disambiguate from similar tools.
Redundant tools: 'add' duplicates functionality present in 'calculate' with operation='add'. This violates single-responsibility and forces LLMs to reason about tool selection without clear differentiation.
Descriptions are too brief (21 and 93 chars) and lack context about output format, when to use the tool, or dependencies.
Parameter descriptions are minimal and lack format/constraint guidance. E.g., 'First number to add' doesn't specify ranges, formats, or precision expectations.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-22 | D | 54 | 2026-07-28+ | v2 |
| 2026-03-09 | F | 22 | - | v1 |
No output schema documented. LLMs don't know what structure to expect from responses. The code returns { content: [{ type: 'text', text: String(result) }] } but this is not declared to the agent.
Error handling in 'calculate' (divide-by-zero) returns plain text without guidance for recovery. Per pattern:recovery-guide, errors should explain what the LLM should do next, not just state the problem.
No tool annotations present. Both tools are marked READ_ONLY but lack readOnlyHint in schema. Per current spec (2026-07-28), tool annotations should declare intent to guide agent behavior.
Missing parameter constraints. 'operation' in 'calculate' uses z.enum() which is good, but numeric parameters 'a' and 'b' lack min/max bounds. Unbounded numbers let LLMs pass extreme values.