Express.js server that provides air pollution data and geocoding endpoints using OpenWeatherMap API
Two tools with basic verb-noun naming (get_air_pollution, get_coordinates). Both have short descriptions (60-80 chars, below the 194-char baseline). Input schemas present with type strings and descriptions, but parameters lack format constraints, ranges, or validation guidance. No output schemas documented. Error handling is minimal, generic 500 errors with no recovery guidance. No tool annotations (readOnlyHint, etc.). Missing pagination, rate-limit guidance, and API key exposure in client-side code (script.js) is a critical security flaw.
Fetches air pollution data for a given latitude and longitude from OpenWeatherMap API
Fetches geographic coordinates (latitude and longitude) for a given city and country using OpenWeatherMap Geocoding API
API key exposed in client-side code (script.js line 1: const API_KEY = 'd34ac75b7194e2b89c4600db2a1feb82'). Credentials must never be hardcoded in client-facing code; use server-side secret injection via environment variables.
No output schemas documented. LLMs cannot plan downstream calls or extract fields without knowing the response structure. Both tools return OpenWeatherMap API responses directly without documentation of fields like 'aqi', 'components', 'lat', 'lon'.
Descriptions are too short (60 - 80 chars vs. 194-char baseline). 'Fetches air pollution data for a given latitude and longitude from OpenWeatherMap API' lacks context on when to use this tool, what data is returned, or how it differs from alternatives. Descriptions should be 50 - 200 chars and answer WHAT, WHEN, and WHAT IS RETURNED.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-23 | F | 42 | 2026-07-28+ | v2 |
Parameters lack format constraints and validation guidance. 'lat' and 'lon' are typed as strings but have no regex pattern, range (e.g., -90 to 90), or format hint. 'city' and 'country' have no length limits or character restrictions. LLMs cannot self-validate inputs.
Error handling is generic and non-actionable. Both endpoints return 'Failed to fetch data' or 'Failed to fetch coordinates' with no guidance on what went wrong or what the LLM should do next. Should categorize errors (retryable, user-fixable, fatal) and suggest recovery steps.