Skip to main content
Glama

get_weather_history

Retrieve historical weather data for Swiss stations by specifying station code and date range. Access past weather conditions for analysis or planning purposes.

Instructions

Get historical weather data for a Swiss station

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
stationYesStation code (e.g. BER)
start_dateYesStart date YYYY-MM-DD
end_dateYesEnd date YYYY-MM-DD

Implementation Reference

  • The handler logic for "get_weather_history" which fetches historical weather data from the MeteoSwiss API.
    case "get_weather_history": {
      const url = buildUrl(`${BASE}/smn/daterange`, {
        locations: args.station as string,
        startdt: args.start_date as string,
        enddt: args.end_date as string,
        app: "mcp-swiss",
        version: "0.1.0",
      });
      const data = await fetchJSON<ApiResponse>(url);
      const payload = data?.payload;
      if (Array.isArray(payload)) {
        const records = extractReadings(payload);
        return JSON.stringify({ station: args.station, count: records.length, data: records });
      }
      return JSON.stringify(data, null, 2);
    }
  • The schema definition for the "get_weather_history" tool.
      name: "get_weather_history",
      description: "Get historical weather data for a Swiss station",
      inputSchema: {
        type: "object",
        required: ["station", "start_date", "end_date"],
        properties: {
          station: { type: "string", description: "Station code (e.g. BER)" },
          start_date: { type: "string", description: "Start date YYYY-MM-DD" },
          end_date: { type: "string", description: "End date YYYY-MM-DD" },
        },
      },
    },
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states the tool retrieves historical data, implying a read-only operation, but doesn't cover important aspects like rate limits, authentication needs, data format, or error handling. For a tool with no annotations, this leaves significant gaps in understanding its behavior.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, clear sentence with no wasted words. It's front-loaded with the core purpose and efficiently conveys the essential information without unnecessary details, making it easy to parse quickly.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's complexity (3 required parameters, no annotations, no output schema), the description is insufficient. It doesn't explain what data is returned (e.g., temperature, precipitation), how results are formatted, or any limitations (e.g., date range constraints). For a data retrieval tool with no structured output documentation, more detail is needed to be complete.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The description adds no parameter-specific information beyond what's in the input schema, which has 100% coverage. It mentions 'Swiss station' and 'historical weather data', which loosely relates to the 'station' parameter and date ranges, but doesn't provide additional context like station code examples or date constraints. With high schema coverage, the baseline score of 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose: 'Get historical weather data for a Swiss station'. It specifies the verb ('Get'), resource ('historical weather data'), and geographic scope ('Swiss station'), making it easy to understand. However, it doesn't differentiate from sibling tools like 'get_weather' or 'list_weather_stations', which prevents a perfect score.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention sibling tools like 'get_weather' (likely for current weather) or 'list_weather_stations', nor does it specify prerequisites or exclusions. The user must infer usage from the name and parameters alone.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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/vikramgorla/mcp-swiss'

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