Weather Dataset Statistics
weather_statsRetrieve metadata about the Weather dataset including stations covered, date range, data sources, and last updated timestamp to understand dataset scope and freshness.
Instructions
Get statistics about the Weather dataset: stations covered, date range, data sources, and last updated timestamp. Free endpoint.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/tools/weather.ts:258-298 (handler)The handler for 'weather_stats' tool which performs an API call to get statistics.
server.registerTool( "weather_stats", { title: "Weather Dataset Statistics", description: "Get statistics about the Weather dataset: stations covered, date range, " + "data sources, and last updated timestamp. Free endpoint.", inputSchema: {}, }, async () => { const res = await apiGet<WeatherStatsResponse>("/api/v1/weather/stats"); if (!res.ok) { if (res.status === 404) { return { content: [ { type: "text" as const, text: "Weather dataset is not yet available. This data source is coming soon.", }, ], }; } return { content: [ { type: "text" as const, text: `API error (${res.status}): ${JSON.stringify(res.data)}`, }, ], isError: true, }; } return { content: [ { type: "text" as const, text: JSON.stringify(res.data, null, 2) }, ], }; }, ); - src/tools/weather.ts:259-259 (registration)The tool is registered with the ID 'weather_stats'.
"weather_stats", - src/tools/weather.ts:22-27 (schema)Interface definition for the 'weather_stats' response.
interface WeatherStatsResponse { dataset: string; source: string; update_frequency: string; stats: Record<string, unknown>; }