A FastAPI-based weather service server that queries weather information by city name using the Juhe (聚合数据) weather API
This MCP server has a single tool (getWeather) with critical definition quality issues. The tool name uses camelCase instead of the verb_noun convention, the description is in Chinese (non-English, limiting LLM accessibility), and while a basic input schema exists, it lacks comprehensive parameter documentation. The tool has no documented output schema, no error handling guidance, and no security considerations for the exposed API key. The implementation is a bare FastAPI endpoint that exposes a third-party weather API without proper abstraction or input validation.
根据城市名称查询天气(适配聚合数据简易天气API)
Tool name violates verb_noun convention. 'getWeather' uses camelCase; should be 'get_weather' to follow Arcade patterns and aid LLM parsing.
Tool description is in Chinese ('根据城市名称查询天气'), making it inaccessible to English-speaking LLMs and limiting cross-language agent compatibility. MCP tool descriptions must be in English.
No output schema documented. The tool returns a structured object with city, temperature, humidity, weather, wind fields, but LLMs cannot predict this structure. Must document return schema with field types and descriptions.
API key (JUHE_API_KEY='5d3dff2f6e5aea75d2adf7f2eeba92bf') hardcoded in source and visible in public repo. This is a credential exposure and security breach. Must use server-side secret injection via environment variables.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-22 | F | 26 | 2026-07-28+ | v2 |
| 2026-03-09 | F | 25 | - | v1 |
Input parameter 'city' has minimal description ('城市名称(如:北京、苏州)' in Chinese). Should explain: acceptable format, whether fuzzy matching is supported, character limits, language requirements, and alternatives if city not found.
Error handling is present (HTTPException for status errors, API errors, parsing errors) but does not provide actionable recovery guidance. Errors like 'Service exception: <message>' do not tell the LLM whether to retry, ask the user, or call an alternative tool.
No input validation beyond basic type. The 'city' parameter accepts any string, including empty strings or absurdly long inputs. Should validate length (e.g., 1-50 chars) and character set (alphanumeric + spaces + common punctuation).
Temperature returned as formatted string '24℃' instead of structured numeric value. LLMs cannot calculate or compare formatted strings reliably. Should return { temperature: 24, unit: 'celsius' } or similar.
No timeout or rate limiting. The 10-second timeout on requests.get() is good, but no rate limiting on tool invocation itself. An agent calling this tool 100x rapidly could overwhelm the JUHE API or burn quota.