MCP server that counts the number of 'r' letters in a given word
Single tool 'count_r' has a basic description (54 chars, within 10-1024 range) but lacks critical depth. Input schema is present with proper type and description for the 'word' parameter. However, the tool name violates verb-noun convention (should be 'count_letters_r' or similar), and the description does not explain WHEN to use it, what it returns, or any prerequisites. Output schema is not documented, LLMs cannot plan downstream calls. Error handling returns inconsistent types (int vs str), which breaks type contracts. No parameter constraints, no pagination guidance, no recovery hints. The tool is trivial (single-purpose), but definition quality is well below production baseline.
Count the number of 'r' letters in the given word
Tool name 'count_r' does not follow verb_noun convention. Should be 'count_letter_r' or 'count_r_occurrences' to clearly signal the action.
Description is too brief (54 chars) and lacks context. Does not explain WHEN to use it, what it returns, or any edge cases (e.g., case-insensitive counting).
Output schema is not documented. LLMs cannot infer that the tool returns an integer count. Add explicit return type documentation.
Error handling returns inconsistent types: function returns int on success but str(e) on error. This breaks type contracts and confuses LLMs. Always return structured error objects with actionable messages.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-23 | F | 42 | 2026-07-28+ | v2 |
No input validation error messages. If word is not a string, the error 'Input must be a string' is returned as an int, violating the return type contract. Validate early and return structured errors.