Weather MCP server providing US weather alerts and forecasts via the National Weather Service API
This server exposes two simple weather tools with basic descriptions and schemas. Both tools are read-only and directly callable via the fastmcp framework. The tool definitions are visible in weather.py and properly registered with @mcp.tool() decorators. However, descriptions lack depth and actionability, parameter descriptions are minimal, output schemas are undocumented, and error handling is perfunctory. The tools follow a verb_noun naming pattern (get_alerts, get_forecast), which is good, but descriptions don't explain WHEN to use each tool, what data structures are returned, or how to handle failures. Parameter validation is weak, latitude/longitude accept any float, state accepts any string without enum validation. Output is free-form text rather than structured JSON. Error messages are generic ('Unable to fetch alerts or no alerts found') and don't guide recovery.
Get weather alerts for a US state.
Get weather forecast for a location.
No output schema documentation. Tools return free-form text strings, making it impossible for LLMs to parse structured data or plan downstream operations. Pattern recommends returning typed objects with documented fields.
Parameter descriptions are minimal and lack constraints. get_alerts 'state' parameter has no validation hint (should be 2-letter code, can link to valid state list). get_forecast latitude/longitude lack range hints (-90 to 90 for latitude, -180 to 180 for longitude). Parameters should specify format, range, and valid values explicitly.
Tool descriptions are too generic (34 chars each: 'Get weather alerts for a US state.' and 'Get weather forecast for a location.'). They don't explain WHEN to use each tool vs the other, what data is returned, or prerequisites. Baseline is 194 chars average for A+ tools. Descriptions should answer: what, when, and what data is returned.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-22 | D | 51 | 2026-07-28+ | v2 |
| 2026-03-09 | F | 37 | - | v1 |
Error handling is perfunctory. Errors are generic strings ('Unable to fetch alerts or no alerts found') with no guidance on what to do next or why failure occurred. Should return structured errors with classification (retryable vs user-fixable), the failure reason, and recovery hints.
No input validation on parameters. get_alerts accepts any string for 'state' (should be 2-letter code). get_forecast accepts any floats for lat/lon (should validate -90..90 and -180..180). Invalid inputs will fail silently at the API level with no LLM-actionable error.
Output is unstructured free-form text. LLMs must parse narrative text to extract weather data, temperature, wind, etc. Best practice is to return structured JSON (typed objects) with fields like alerts[], forecast[], each with typed subfields (event, severity, temperature, etc.). Unstructured output wastes tokens and invites parsing errors.