An MCP server that provides weather forecast and alert information using the National Weather Service (NWS) API
This MCP server provides two weather tools with basic descriptions and input schemas, but falls short of production quality standards. Tool naming follows verb_noun convention appropriately (get_alerts, get_forecast), but parameter descriptions are minimal, output schemas are undocumented, and error handling lacks recovery guidance. The server registers tools via FastMCP decorators with explicit schemas, so definitions are directly visible (not inferred). However, descriptions are sparse (18-20 characters for parameters), and the response format is unstructured plain text rather than typed JSON objects. Parameter validation is present (type hints in function signatures) but not fully documented in descriptions. No input parameters accept enums where constrained values would be appropriate (e.g., state codes could be an enum). Error responses return plain strings without actionable guidance, 'Unable to fetch alerts' tells the LLM nothing about what to do next.
Get weather alerts for a US state.
Get weather forecast for a location.
Parameter descriptions are minimal and lack constraint details. 'state' is described as 'Two-letter US state code (e.g. CA, NY)', 34 characters, which names the format but does not state it as an enum or provide validation guidance. Should declare valid state codes as an enum to prevent hallucinated values.
Output schema is not documented. Both tools return plain text strings via response.json() → string, but the LLM does not know the structure. Responses should be typed JSON objects with fields like {alerts: Array<{event, area, severity}>, total_count: number} so agents can extract and chain data.
Error handling lacks recovery guidance. Error messages like 'Unable to fetch alerts or no alerts found' and 'Unable to fetch forecast data for this location' are generic and do not guide the agent on what to do next (retry, check input, try alternate tool, etc.). Should follow pattern:recovery-guide.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-22 | D | 50 | 2026-07-28+ | v2 |
| 2026-03-09 | F | 34 | - | v1 |
Numeric parameters (latitude, longitude) lack range constraints. Descriptions state 'Latitude of the location' and 'Longitude of the location' but do not specify valid ranges (lat: -90 to 90, lon: -180 to 180). LLMs can pass invalid coordinates causing silent API failures.
No pagination support. get_alerts returns all active alerts for a state (formatted as plain text) without limit or offset parameters. A state with hundreds of active alerts would bloat the response and exhaust context windows.