Skip to main content
Glama

weather_stats

Retrieve 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
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • 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) },
          ],
        };
      },
    );
  • The tool is registered with the ID 'weather_stats'.
    "weather_stats",
  • Interface definition for the 'weather_stats' response.
    interface WeatherStatsResponse {
      dataset: string;
      source: string;
      update_frequency: string;
      stats: Record<string, unknown>;
    }

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/carrierone/verilexdata-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server