MCP server that provides real-time weather information for specified cities using OpenWeatherMap API
Single tool with significant quality gaps. The get_weather tool has a reasonable name (verb_noun pattern) but lacks essential rigor for production use. Description is present but minimal (193 chars). Critical gaps: (1) NO input parameter schema visible in code, the function signature shows 'city: str' but this is not formally registered as a JSON Schema with constraints; (2) NO output schema documented, the return type is 'str' (unstructured text), not a structured object; (3) NO parameter description for 'city' explaining expected format, length, or valid values; (4) error handling returns unstructured strings rather than structured error objects with actionable recovery guidance; (5) no enum constraints on valid cities, LLMs will hallucinate city names; (6) no rate limiting or quota documentation despite calling external API; (7) timeout hardcoded to 10 seconds with no explanation of retry behavior. The code itself is functional but the MCP tool definition is underspeified.
查询指定城市的天气状况,数据来自 OpenWeatherMap 实时 API。
No formal input schema visible. Function signature shows 'city: str' but fastmcp @mcp.tool() decorator does not explicitly register JSON Schema constraints for the 'city' parameter. No type, description, or enum values declared.
Missing parameter description. The 'city' parameter has no description explaining expected format (e.g., 'City name (2-50 chars, Latin alphabet)'). LLMs cannot infer constraints from names alone.
No output schema documented. Return type is raw string, not structured JSON. Tool description does not specify what fields the response contains or what format it uses. LLMs cannot parse or chain results.
Unstructured error responses. Errors return free-text strings like '【错误】: OPENWEATHER_API_KEY 未设置' rather than structured objects with error codes and recovery guidance. LLM cannot distinguish retryable from fatal errors.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-22 | F | 8 | 2026-07-28+ | v2 |
| 2026-03-09 | F | 31 | - | v1 |
No API key validation or timeout guidance. Tool description does not mention that OPENWEATHER_API_KEY env var is required, or what happens if the API times out. Hardcoded timeout=10.0 is not documented.
No rate limiting, quota, or usage limits documented. Tool calls external API with no mention of rate limits, daily quotas, or whether agents can call it in loops without throttling.
Tool description in Chinese. While the code demonstrates internationalization (UTF-8 handling, zh_cn language param), the tool description 'Query weather for specified city, data from OpenWeatherMap real-time API' should match the server's documented language. MCP specs do not restrict this, but it may confuse non-Chinese-speaking users.