Two tools with clear names and reasonable descriptions, but significant gaps in schema completeness and parameter documentation. The 'evaluate' tool has a well-structured input schema with type and description for both parameters, but the 'clear' tool has no input parameters documented. Output schemas are not formally documented, responses are free-form strings rather than structured objects. Error handling exists in the code but is not reflected in tool descriptions. No tool annotations (readOnlyHint/destructiveHint) despite clear semantic differences between the tools.
Clear the RPN calculator stack. Removes all values from the current session stack.
Evaluate an RPN (Reverse Polish Notation) expression. Operators: +, -, *, /, **, % (add, subtract, multiply, divide, power, modulo). Commands: clear (clear stack), dup (duplicate top), swap (swap top two). Example: '3 4 +' returns 7
Output schemas not documented. Both tools return free-form strings instead of structured objects. LLMs cannot reliably parse results or chain to downstream tools.
Missing tool annotations. 'evaluate' is read-only; 'clear' is destructive. No readOnlyHint or destructiveHint declared, forcing LLMs to infer semantics.
Error handling not documented in tool descriptions. Code catches division-by-zero, insufficient operands, and invalid tokens, but descriptions do not explain error cases or recovery paths.
'clear' tool has no input schema documentation. While it takes no parameters, the description should explicitly state this and explain the side effect (stack is cleared).
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-23 | D | 53 | 2026-07-28+ | v2 |
Stateful session design. Both tools operate on a shared CalculatorSession instance. This violates stateless request handling, each request should be self-contained or session state should be passed as a parameter.