A sample MCP server demonstrating tool registration and stdio transport with random number generation capabilities.
Single tool with clear naming (GetRandomNumber) and complete input schema. Description is adequate (73 chars, within 10-1024 range). Parameters have types and descriptions. However, output schema is undocumented, LLMs cannot infer the return type or structure. No error handling guidance. No parameter constraints (min/max bounds not enforced in description). Tool is read-only but lacks explicit idempotentHint annotation. Baseline: 549 production tools average 18-char names (this is 16), 194-char descriptions (this is 73, below average but acceptable). Missing output documentation and error recovery patterns.
Generates a random number between the specified minimum and maximum values.
Output schema not documented. LLMs cannot infer return type (int) or structure. Agents need explicit documentation of what fields to expect.
No error handling guidance. Tool description does not explain what happens if min >= max or if parameters are out of bounds. No recovery hints for LLMs.
Parameter constraints not enforced in description. min and max have defaults (0, 100) but no documented bounds or validation rules. Description should state: 'min must be less than max; both must be within int32 range.'
Tool is read-only but lacks idempotentHint annotation. Adding [idempotentHint] to the McpServerTool attribute signals to agents that repeated calls are safe.
Inferred effective spec: <=2025-11-25.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-23 | F | 45 | <=2025-11-25 | v2 |
Tool description is brief (73 chars, below 194-char baseline). Does not explain WHEN to use this tool or what downstream operations might follow. Expand to: 'Generates a random integer for testing, sampling, or decision-making. Returns a single int value. Idempotent, safe to retry.'