An agentic MCP system that provides calculator tools (add, subtract, multiply, divide, power, sqrt, factorial) and integrates with Google Gemini for planning and execution
Seven basic arithmetic tools with consistent naming (verb_noun pattern: add, subtract, multiply, divide, power, sqrt, factorial) and present descriptions. All tools have input schemas with typed parameters and descriptions. However, descriptions are minimal (10-60 chars, below the 50-200 char baseline for LLM optimization), lack usage guidance, and omit error recovery hints. No output schemas documented. Error handling exists (divide-by-zero, negative factorial) but error messages are generic. Tools are well-composed (single responsibility) and idempotent. Missing: pagination (not applicable), permission gates, audit trails, and rate limiting (appropriate for a calculator but worth noting). Parameter descriptions are adequate but terse.
Add two numbers together. Use when user wants sum, total, or addition.
Divide first number by second. Use for ratios or splitting values.
Compute factorial of a non-negative integer.
Multiply two numbers. Use for product, scaling, or repeated addition.
Raise a to the power of b. Use for exponentiation like x^y.
Return square root of a number.
Subtract second number from first. Use for difference or remainder calculations.
Descriptions are too brief (10-60 chars vs. 50-200 char baseline). Missing WHEN to use guidance and error recovery hints. E.g., 'Add two numbers together' lacks context for LLM selection vs. similar tools.
No output schemas documented. LLMs cannot infer return types (float vs. int, error structure). Baseline: 100% of A+ tools document return types.
Error messages are generic ('division by zero', 'negative not allowed'). Missing recovery guidance. Should be: 'Cannot divide by zero. Ensure denominator is non-zero.' [pattern:recovery-guide]
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-23 | D | 55 | 2026-07-28+ | v2 |
sqrt() lacks input validation for negative numbers. Will raise unhandled exception. Should validate and return actionable error: 'Cannot compute sqrt of negative number. Input must be >= 0.'
No tool annotations (readOnlyHint, idempotentHint). All tools are read-only and idempotent, should declare this for agent optimization.