A calculator MCP server that provides mathematical operations
This is a functional but basic MCP server. All 5 tools are explicitly defined using FastMCP decorators with proper input schemas and basic descriptions. Tool names follow verb_noun conventions (add, multiply, division, square_root, factorial) and are appropriately action-oriented. All parameters have type declarations and descriptions. However, descriptions are minimal (10-50 chars), lacking context about when to use each tool or typical use cases. Output schemas are not documented, the code shows return types (int, float) but no structured documentation of what the LLM should expect. Error handling is present in the code (zero-check for division, negative-check for sqrt/factorial) but error messages are not designed for LLM recovery, they are generic ValueError strings without guidance on what the LLM should do next. The tool set is cohesive (pure math operations, no side effects) and parameters are well-typed, but the server lacks sophistication in schema documentation and error guidance that would be expected in a production-grade agent tool.
Add two numbers
Divide a by b. Raises error if b is zero.
Return factorial of n.
Multiply two numbers
Return the square root of x.
Descriptions are too brief (10-55 chars). Baseline is 194 chars for tool descriptions and 72 chars for parameters. Current descriptions lack context about when to use each tool or typical use cases. For example, 'Add two numbers' does not explain when an LLM should prefer add() over other numeric operations or what the output represents.
Output schemas are not documented. The code shows return types (int, float) but there is no structured documentation (schema, description, example) of what the LLM should expect from each tool's output. This forces the LLM to infer the response structure and type.
Error messages are not designed for LLM recovery. Division by zero, negative square root, and negative factorial raise ValueError with generic messages like 'Division by zero is not allowed.' These do not tell the LLM what to do next (e.g., 'Try a different divisor' or 'Ask the user for a non-negative number').
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-22 | D | 56 | 2026-07-28+ | v2 |
| 2026-03-09 | F | 43 | - | v1 |
No enum or range constraints on numeric parameters. Parameters like 'n' for factorial accept any integer, but factorial is undefined for negative numbers and computationally infeasible for very large numbers (e.g., n > 20). The schema should declare min/max bounds (e.g., 0 <= n <= 20) to guide LLM input selection and prevent invalid requests.
Division tool accepts float but add/multiply only accept int. This inconsistency may confuse the LLM, if it tries to compute fractional intermediate results, add/multiply will reject them. The schema should clarify: are these pure-math tools for integers only, or should they accept mixed numeric types?