MCP server that provides weather alerts for US states using the National Weather Service API
Single tool with basic structure but significant definition gaps. Tool name is verb-led ('get-alerts'), description is present (97 chars, within acceptable range), but input schema is incomplete and lacks proper typing. No documented output schema. Parameter validation is minimal. Error handling returns generic text without recovery guidance. The tool is directly visible in src/MCPServer.ts with explicit registration via server.registerTool(), so not capped at 50 for inference, but falls well short of production standards due to schema incompleteness and lack of output documentation.
Get weather alerts for a state given a two-letter state code (e.g. CA, NY)
Input schema uses Zod validation but lacks proper JSON Schema type declaration in the schema object itself. GetAlertsInputSchema defines a 'state' parameter but does not include explicit 'type' field in the schema object passed to registerTool(). The Zod schema is a JavaScript object, not a valid JSON Schema that clearly declares type='string'.
No documented output schema. The tool returns MCPTextContent (a text response) but agents cannot predict the structure. LLMs need to know: is this a single string, or an object with fields? What fields are guaranteed? The response format is undocumented, forcing agents to guess at downstream processing.
Parameter 'state' description includes constraint info ('length must be 2') but as free text in the description string, not as a formal constraint in the schema. The Zod .length(2) is server-side validation only, the schema object passed to registerTool() does not expose this constraint as JSON Schema 'minLength'/'maxLength', so LLMs cannot self-validate before calling.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-22 | F | 45 | 2026-07-28+ | v2 |
| 2026-03-09 | F | 43 | - | v1 |
Error handling is generic. The tool catches errors and returns 'Failed to retrieve alerts data' without telling the LLM what to do next, what the root cause was, or whether to retry. No distinction between retryable (network timeout) and non-retryable errors (invalid state code).
Tool description lacks action context. It says WHAT it does ('Get weather alerts') but not WHEN to use it vs. other weather tools, what prerequisite data is needed (state code format), or what the agent should expect to receive. Description is only 97 chars, below ideal mid-range of 194 chars for tool descriptions.