A simple ping-pong MCP server with session management, supporting both FastAPI and SSE transports
Single tool 'ping-pong' has a generic, non-action-verb name that violates naming conventions. Description is minimal (34 chars, below 50-char baseline for clarity). Input schema is present with two parameters (command, session_id), both typed as strings with descriptions, but lacks enum constraints on the 'command' parameter despite accepting only three known values ('ping', 'pong', 'count'). No output schema documented. Error handling returns raw exception strings instead of actionable recovery guidance. Tool violates single-responsibility principle by handling three distinct commands in one tool. No parameter validation or constraint documentation.
MCP handler for ping-pong commands
Tool name 'ping-pong' does not start with action verb. Should be 'send_ping', 'execute_ping_pong', or split into separate tools (send_ping, send_pong, get_ping_pong_count). LLMs cannot infer intent from hyphenated names.
Parameter 'command' accepts only three values ('ping', 'pong', 'count') but is defined as free-form string with no enum constraint. LLMs will hallucinate invalid commands. Must declare enum: ['ping', 'pong', 'count'].
No output schema documented. Tool returns string responses ('pong', 'ping', count value, or error message) but LLMs cannot plan downstream actions without knowing the response structure. Must document return type and field names.
Error handling returns raw exception strings (e.g., 'str(e)') instead of actionable recovery guidance. Per pattern:recovery-guide, errors must tell the LLM what to do next. Example: 'Invalid command. Must be one of: ping, pong, count' instead of raw exception.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-23 | F | 34 | 2026-07-28+ | v2 |
Tool violates single-responsibility principle by handling three distinct operations (ping, pong, count) in one tool. Should split into send_ping, send_pong, and get_ping_pong_count so agent can compose them independently.