MCP server for weather information using Spring AI, providing weather details for cities in the United States
Single tool with minimal definition quality. Tool name 'getWeatherDetailsForCity' uses camelCase (non-standard verb_noun pattern) and lacks clarity on what 'details' means. Description is only 31 characters, below the 50-char minimum for LLM optimization. Input schema present but sparse: only 'city' parameter with basic string type, no format constraints, no enum, no min/max length. No output schema documented. Error handling returns a plain string message without structured guidance. Tool lacks idempotent/readonly annotations despite being read-only. No pagination, no result limits documented. Overall: bare-minimum implementation suitable only for trivial use cases.
get the weather details of a city
Tool name uses camelCase instead of snake_case verb_noun pattern. 'getWeatherDetailsForCity' should be 'get_weather_forecast' or 'get_city_weather'. LLMs parse verb_noun naming more reliably.
Description is only 31 characters ('get the weather details of a city'). Below 50-char minimum for LLM optimization. Should explain WHAT (forecast data), WHEN (before planning outdoor activities), and WHAT IT RETURNS (temperature, conditions, forecast periods).
Input schema lacks constraints. 'city' parameter has no format, length limits, or enum. Should specify: 'US city name (2-50 chars, e.g. Seattle, New York). Supports city names only; coordinates not accepted.' Prevents LLM from passing invalid values.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-23 | F | 37 | 2026-07-28+ | v2 |
No output schema documented. LLM cannot predict response structure (fields, types, nesting). Should document: returns string with forecast periods (name, temperature, unit, short/detailed forecast). Consider returning structured JSON instead of formatted string.
Tool lacks readonly/idempotent annotations. Spring AI supports @Tool annotations for readOnlyHint and idempotentHint. Should mark this tool as read-only to signal to agents it is safe to call multiple times without side effects.