This MCP server provides simple calculator functions to perform operations on numbers. Available operations include addition, subtraction, multiplication, division, and more. The calculator supports basic arithmetic, trigonometric functions, logarithms, and more. All operations are performed with high precision and detailed results are provided.
This calculator MCP has clear, well-structured tool definitions with consistent naming conventions and comprehensive descriptions. All 11 tools follow verb_noun patterns (add, subtract, multiply, divide, power, modulo, calculate, square_root, factorial, logarithm, trigonometric). Every tool has a description (10-50 chars minimum), and all input parameters are typed with descriptions. However, there are critical gaps: (1) no output schemas documented for any tool, callers must infer that tools return formatted strings; (2) no error classification or recovery guidance in descriptions (only raw error messages in code); (3) missing idempotency markers and permission declarations; (4) the 'calculate' tool uses eval() with only character-level filtering, creating injection risks despite the code comment acknowledging this.
Add two numbers together.
Evaluate a simple mathematical expression.
Divide the first number by the second.
Calculate the factorial of a non-negative integer.
Calculate the logarithm of a number with the specified base.
Calculate the remainder when the first number is divided by the second.
Multiply two numbers together.
No output schema documented for any tool. All tools return formatted strings, but the response structure (always markdown-formatted text) is not formally declared. LLMs cannot plan downstream operations or validate response structure.
Error handling does not classify errors or provide recovery guidance. Descriptions state 'Division by zero is not allowed' but do not indicate this is a user-fixable input error. Errors return plain strings without structured type (e.g., {"error": "...", "type": "validation"}).
The 'calculate' tool accepts arbitrary mathematical expressions via eval() despite a character whitelist. This is documented as unsafe in comments but the whitelist (0-9, +−*/, spaces, dots) still permits expressions like '__import__' via unicode or other bypasses. No dry-run or confirmation pattern is offered before evaluation.
Inferred effective spec: <=2025-11-25.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-22 | C | 64 | <=2025-11-25 | v2 |
| 2026-03-09 | D | 59 | - | v1 |
Raise the base to the power of the exponent.
Calculate the square root of a number.
Subtract the second number from the first.
Calculate trigonometric functions (sin, cos, tan).
No tool annotations (readOnlyHint, idempotentHint, destructiveHint) present. All tools are marked READ_ONLY in the audit, but this is not declared in the tool definitions themselves, limiting agent planning capability.
Parameter descriptions lack format and constraint details. E.g., 'base' in logarithm is described as 'The base of the logarithm (default: 10)' but does not state that base must be > 0 and ≠ 1. LLMs cannot validate inputs before calling.
The 'calculate' tool description mentions eval() is dangerous but does not guide the LLM to alternative safe tools (add, multiply, etc.) for simple expressions. No composition guidance provided.