Skip to main content
Glama

get_snow_conditions

Retrieve current snow depth and 24-hour snowfall data for Swiss mountain stations to assess skiing, hiking, or avalanche conditions. Filter by canton or altitude for targeted information.

Instructions

Get current snow conditions across Switzerland from SLF (WSL Institute for Snow and Avalanche Research). Returns snow depth and new snow (24h) for IMIS stations, sorted by snow depth. Filter by canton or minimum altitude. Data updated daily.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
cantonNoFilter by canton abbreviation (e.g. GR, VS, BE, UR, TI). Optional.
min_altitudeNoMinimum station altitude in metres (e.g. 2000). Optional.
limitNoMaximum number of stations to return (default: 20, max: 100).

Implementation Reference

  • The logic that fetches, filters, and processes snow condition data.
    async function handleGetSnowConditions(
      args: Record<string, unknown>
    ): Promise<string> {
      const canton = typeof args.canton === "string" ? args.canton.trim().toUpperCase() : undefined;
      const minAlt = typeof args.min_altitude === "number" ? args.min_altitude : undefined;
      const limit = Math.min(Math.max(Number(args.limit) || 20, 1), 100);
    
      // Fetch snow data and station metadata in parallel
      const [dailySnow, stations] = await Promise.all([
        fetchJSON<DailySnow[]>(`${BASE}/imis/daily-snow`),
        fetchJSON<ImisStation[]>(`${BASE}/imis/stations`),
      ]);
    
      // Build station lookup
      const stationMap = new Map<string, ImisStation>();
      for (const s of stations) {
        stationMap.set(s.code, s);
      }
    
      // Join, filter, sort
      const joined = dailySnow
        .map((d) => {
          const s = stationMap.get(d.station_code);
          if (!s) return null;
          return {
            station: s.label,
            code: s.code,
            altitude_m: s.elevation,
            canton: s.canton_code,
            snow_depth_cm: d.HS,
            new_snow_24h_cm: d.HN_1D,
            date: d.measure_date?.slice(0, 10) ?? null,
          };
        })
        .filter((r): r is NonNullable<typeof r> => {
          if (!r) return false;
          if (canton && r.canton !== canton) return false;
          if (minAlt !== undefined && r.altitude_m < minAlt) return false;
          return true;
        })
        .sort((a, b) => (b.snow_depth_cm ?? 0) - (a.snow_depth_cm ?? 0))
        .slice(0, limit);
    
      return JSON.stringify({
        count: joined.length,
        filters: {
          ...(canton ? { canton } : {}),
          ...(minAlt !== undefined ? { min_altitude_m: minAlt } : {}),
        },
        stations: joined,
        source: "WSL Institute for Snow and Avalanche Research SLF (CC BY 4.0)",
      });
    }
  • The registration of the 'get_snow_conditions' tool within the 'snowTools' array.
    export const snowTools = [
      {
        name: "get_snow_conditions",
        description:
          "Get current snow conditions across Switzerland from SLF (WSL Institute for Snow and Avalanche Research). " +
          "Returns snow depth and new snow (24h) for IMIS stations, sorted by snow depth. " +
          "Filter by canton or minimum altitude. Data updated daily.",
        inputSchema: {
          type: "object",
          properties: {
            canton: {
              type: "string",
              description:
                "Filter by canton abbreviation (e.g. GR, VS, BE, UR, TI). Optional.",
            },
            min_altitude: {
              type: "number",
              description:
                "Minimum station altitude in metres (e.g. 2000). Optional.",
            },
            limit: {
              type: "number",
  • The JSON schema definition for the 'get_snow_conditions' input parameters.
    inputSchema: {
      type: "object",
      properties: {
        canton: {
          type: "string",
          description:
            "Filter by canton abbreviation (e.g. GR, VS, BE, UR, TI). Optional.",
        },
        min_altitude: {
          type: "number",
          description:
            "Minimum station altitude in metres (e.g. 2000). Optional.",
        },
        limit: {
          type: "number",
Behavior4/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It effectively describes key traits: the data source (SLF), update frequency (daily), return data (snow depth and new snow for IMIS stations), sorting (by snow depth), and filtering capabilities. However, it lacks details on error handling, rate limits, or authentication needs.

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 front-loaded with the core purpose and efficiently uses two sentences to cover data source, return values, sorting, filtering, and update frequency without any wasted words, making it highly concise and well-structured.

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

Completeness4/5

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

Given the tool's moderate complexity (3 parameters, no output schema, no annotations), the description is mostly complete, covering purpose, data source, return values, sorting, filtering, and update frequency. However, it could improve by mentioning output format or error scenarios, but it's adequate for a read-only data retrieval tool.

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 input schema has 100% description coverage, so the baseline is 3. The description adds minimal value beyond the schema by mentioning filtering by canton or minimum altitude, but it does not provide additional syntax, format details, or examples beyond what is already documented in the schema.

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

Purpose5/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 with specific verbs ('Get current snow conditions') and resources ('across Switzerland from SLF'), distinguishing it from siblings like 'get_snow_measurements' or 'list_snow_stations' by specifying the data source (SLF) and the type of conditions (snow depth and new snow).

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

Usage Guidelines3/5

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

The description implies usage for retrieving snow conditions with filtering options (by canton or altitude), but it does not explicitly state when to use this tool versus alternatives like 'get_snow_measurements' or 'list_snow_stations', nor does it mention any prerequisites or exclusions.

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