A Model Context Protocol server that provides weather alerts and forecasts for US locations using the National Weather Service API
Weather MCP server has two tools with adequate basic structure but significant gaps in definition quality. Both tools have descriptions and visible input schemas, but descriptions are minimal (10-20 chars territory), parameter descriptions lack depth and context for LLM decision-making, and no output schemas are documented. Tool naming follows verb-noun convention (good), but parameter documentation is sparse. No error handling guidance, no mention of API rate limits or timeout behavior, and output is returned as plain text strings rather than structured objects. This is a beginner-level server suitable for learning but not production deployment.
Get weather alerts for a US state.
Get weather forecast for a location.
Minimal parameter descriptions lack actionable context for LLM selection. The 'state' parameter in get_alerts says 'Two-letter US state code (e.g. CA, NY)' which includes an example value. The 'latitude' and 'longitude' parameters in get_forecast lack any description of valid ranges, precision, or error cases (e.g., what happens with coordinates outside the continental US where NWS has no data?). Per pattern:tool-description, parameter descriptions must explain what they control and guide LLM reasoning.
No output schema documented. Tools return plain text strings, but LLMs need to know the structure of responses to plan downstream operations. For get_alerts, the output is formatted alert strings separated by '---', this structure should be formally documented. For get_forecast, the output includes formatted periods with Temperature, Wind, Forecast, but the exact format and available fields are implicit in code, not visible in tool metadata. Per pattern:tool, all tools must document return types and structures.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-22 | F | 45 | 2026-07-28+ | v2 |
| 2026-03-09 | F | 36 | - | v1 |
Tool descriptions are too generic and lack differentiation context. 'Get weather alerts for a US state' (43 chars) and 'Get weather forecast for a location' (35 chars) are under the 50-char minimum for clarity and do not answer: When should I use this instead of the other? What does it cost (API rate limit)? What geographic coverage? Per pattern:tool-description, descriptions must state WHAT the tool does, WHEN to use it, and prerequisites.
No error handling guidance. The code calls make_nws_request() which returns None on exceptions, and tools respond with generic strings like 'Unable to fetch alerts or no alerts found.' An LLM has no idea whether this is a transient network error (retry) or invalid input (ask user). Per pattern:recovery-guide, errors must tell the LLM what to do next: is this retryable? Should I ask the user for different coordinates? Is the NWS API down?
No input validation constraints documented. get_alerts accepts any string for 'state', what happens if the user passes 'California' instead of 'CA'? get_forecast accepts any floats, no mention of valid lat/lon ranges (-90 to 90, -180 to 180), precision expectations, or that NWS only covers US regions. Per pattern:constrained-input, known constraints must be declared as enums or patterns in the schema AND explained in descriptions.
No dependency or discovery guidance. If an agent has only a city name (not coordinates), get_forecast cannot be called directly, it needs lat/lon. There is no 'search_location' or 'geocode' tool, and the forecast tool description does not suggest this dependency. Per pattern:tool-description, discovery tools should hint at dependencies: 'Provide latitude/longitude; if you only have a city name, use a geocoding service first.'
Tools are not idempotent and lack compensation design. An agent that retries get_forecast on a timeout will make duplicate NWS API calls, wasting rate limit quota. There is no dry-run mode for irreversible operations (though these are read-only, so less critical). Per pattern:idempotent-operation, agents retry on ambiguous failures, tools should be designed to handle retries gracefully.
Example values in parameter descriptions ('e.g. CA, NY') risk LLM literal reuse. Per pattern:tool-description, examples should be replaced with formal constraints (enums for state codes, regex patterns for formats). The description 'Two-letter US state code (e.g. CA, NY)' should be 'Two-letter US state code (enum: AL, AK, AZ, ...)' or a regex pattern '^[A-Z]{2}$'.