Skip to main content
Glama

list_avalanche_regions

Retrieve Swiss avalanche warning regions with IDs, names, cantons, and elevations for use with avalanche bulletins. Filter by canton if needed.

Instructions

List all Swiss avalanche warning regions as defined by SLF/EAWS. Returns region IDs, names, cantons, and typical elevations. Use region IDs with get_avalanche_bulletin.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
cantonNoFilter regions by canton abbreviation (e.g. GR, VS, BE). Optional.

Implementation Reference

  • The handler function 'handleListAvalancheRegions' that retrieves and formats the list of avalanche regions.
    async function handleListAvalancheRegions(args: Record<string, string>): Promise<string> {
      let regions = SWISS_AVALANCHE_REGIONS;
    
      if (args.canton) {
        const cantonQuery = args.canton.trim().toUpperCase();
        regions = SWISS_AVALANCHE_REGIONS.filter((r) =>
          r.canton.toUpperCase().includes(cantonQuery)
        );
      }
    
      const result = {
        count: regions.length,
        source: "SLF/EAWS Swiss Avalanche Warning Regions",
        regions: regions.map((r) => ({
          id: r.id,
          name: r.name,
          canton: r.canton,
          typical_elevation_m: r.elevation_m,
        })),
        usage: "Pass region ID (e.g. 'CH-9') to get_avalanche_bulletin for region-specific bulletin link",
        bulletin_map: "https://whiterisk.ch/en/conditions",
      };
    
      return JSON.stringify(result);
    }
  • The tool definition and schema for 'list_avalanche_regions'.
    {
      name: "list_avalanche_regions",
      description:
        "List all Swiss avalanche warning regions as defined by SLF/EAWS. " +
        "Returns region IDs, names, cantons, and typical elevations. " +
        "Use region IDs with get_avalanche_bulletin.",
      inputSchema: {
        type: "object",
        properties: {
          canton: {
            type: "string",
            description: "Filter regions by canton abbreviation (e.g. GR, VS, BE). Optional.",
          },
        },
      },
    },
  • The registration of 'list_avalanche_regions' in the avalanche tool dispatcher.
    case "list_avalanche_regions":
      return handleListAvalancheRegions(args);

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