A server for the weather-mcp project that provides weather alerts and forecasts using the National Weather Service API
This server has 2 tools with explicit registration, proper JSON schemas, and basic descriptions. However, the descriptions are minimal (25-36 chars, below the 50-200 char ideal for LLM-optimized tools), parameter descriptions are missing in the schema definitions, and there is no output schema documentation. The tool names follow verb_noun conventions (good), but lack context about return types, when to use each tool, and error recovery paths. Input validation via Zod is present and constraints are enforced (latitude/longitude bounds, state code length), but the schema itself does not reflect these constraints in a way the LLM can see them. No error handling guidance is provided to the LLM.
Get weather alerts for a state
Get weather forecast for a location
webSearch
Minimal tool descriptions lack LLM-optimized context. 'Get weather alerts for a state' (25 chars) does not explain when to use this tool over get-forecast, what data structure is returned, or what a user should expect. Descriptions should be 50-200 chars and include WHAT, WHEN, and output hints.
Input schema definitions do not include parameter descriptions. The JSON Schema for 'get-alerts' has a 'state' property but no description field visible in the schema object itself. While the code comment mentions 'Two-letter state code (e.g. CA, NY)', this is not in the schema. LLMs cannot see code comments, they only see the schema passed to ListToolsRequestSchema. Parameters must have descriptions inside the schema.
No output schema documentation. The code returns formatted text (alertsText, forecastText) wrapped in a content array, but the LLM has no way of knowing the structure of the forecast response or how many fields are included. A documented schema like { type: 'object', properties: { alert_count: 'number', alerts: [{ event, area, severity, status, headline }] } } would enable downstream planning.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-22 | F | 6 | 2026-07-28+ | v2 |
| 2026-03-09 | F | 40 | - | v1 |
No error recovery guidance in tool responses. The code returns 'Failed to retrieve alerts data' or 'No active alerts for CA' as plain text. An LLM receiving 'Failed to retrieve alerts data' does not know whether to retry, check network, adjust parameters, or abandon the task. Error responses should guide recovery: 'Failed to fetch alerts (network timeout). Retry with different state or check your connection.'
Parameter constraints not exposed in schema. Zod validation enforces latitude ∈ [-90, 90] and longitude ∈ [-180, 180], and state must be length 2. However, the schema object passed to the LLM has no 'minimum', 'maximum', 'minLength', or 'maxLength' fields. An LLM cannot see these constraints and may pass invalid values, triggering validation errors that return 'ZodError' or generic messages instead of actionable feedback.
No pagination support or result limits enforced in schema. The get-alerts tool calls the NWS API without pagination and slices results to 20 with a code comment 'only take the first 20 alerts'. However, there is no 'limit' or 'page' parameter exposed to the LLM, no documentation that results are capped at 20, and no next_cursor to fetch more. An LLM will not know alerts are truncated and may miss critical warnings.
Schema format uses plain JSON instead of proper JSON Schema. The inputSchema for 'state' does not include format, pattern, or description fields at the schema level. Example: { type: 'string', description: 'Two-letter US state code (CA, NY, TX, ...)', pattern: '^[A-Z]{2}$', minLength: 2, maxLength: 2 }. This enables LLM self-correction and validates input before hitting the NWS API.