Skip to main content
Glama

get_avalanche_bulletin

Retrieve current Swiss avalanche danger bulletins with daily updates, providing danger levels, regional data, and interactive map links for safety planning.

Instructions

Get the current Swiss avalanche danger bulletin from SLF (WSL Institute for Snow and Avalanche Research). Returns current bulletin URLs, danger level descriptions, and links to the interactive map. The bulletin is published daily at ~08:00 and updated at ~17:00 Swiss time (October–May).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
regionNoOptional region ID (e.g. CH-9 for Central Graubünden) or region name. Use list_avalanche_regions to see all options. If omitted, returns national overview.
languageNoLanguage for bulletin links: de (German), en (English), fr (French), it (Italian). Default: en

Implementation Reference

  • The handler function responsible for executing the 'get_avalanche_bulletin' tool. It constructs bulletin URLs and optional region-specific links.
    async function handleGetAvalancheBulletin(args: Record<string, string>): Promise<string> {
      const lang = SUPPORTED_LANGUAGES.includes(args.language) ? args.language : "en";
      const today = todayISO();
    
      // Find matching region if specified
      let matchedRegion: typeof SWISS_AVALANCHE_REGIONS[0] | undefined;
      if (args.region) {
        const query = args.region.trim().toLowerCase();
        matchedRegion = SWISS_AVALANCHE_REGIONS.find(
          (r) =>
            r.id.toLowerCase() === query ||
            r.name.toLowerCase().includes(query) ||
            r.canton.toLowerCase().includes(query)
        );
      }
    
      const pdfUrl = bulletinPdfUrl(lang);
      const mapUrl = whiteRiskUrl(lang);
    
      const result: Record<string, unknown> = {
        date: today,
        source: "SLF – WSL Institute for Snow and Avalanche Research",
        bulletin_url: {
          interactive_map: mapUrl,
          pdf_full: pdfUrl,
          pdf_regions: {
            de: "https://aws.slf.ch/api/bulletin/document/full/de",
            en: "https://aws.slf.ch/api/bulletin/document/full/en",
            fr: "https://aws.slf.ch/api/bulletin/document/full/fr",
            it: "https://aws.slf.ch/api/bulletin/document/full/it",
          },
        },
        danger_scale: DANGER_LEVELS,
        schedule: {
          morning_bulletin: "~08:00 CET/CEST",
          afternoon_update: "~17:00 CET/CEST",
          season: "October to May (daily). Summer bulletins are occasional.",
        },
        note:
          "The SLF JSON API requires authentication (used by the White Risk app). " +
          "Current danger levels are available via the interactive map at whiterisk.ch " +
          "or as PDF bulletins at the URLs above. " +
          "For programmatic access, contact SLF at lawinfo@slf.ch.",
      };
    
      if (matchedRegion) {
        result.region = {
          id: matchedRegion.id,
          name: matchedRegion.name,
          canton: matchedRegion.canton,
          typical_elevation_m: matchedRegion.elevation_m,
          bulletin_link: `${mapUrl}#region=${matchedRegion.id}`,
        };
        result.tip = `Check ${matchedRegion.name} (${matchedRegion.id}) on the interactive map: ${mapUrl}`;
      } else if (args.region) {
        result.region_not_found = args.region;
        result.tip = `Use list_avalanche_regions to see valid region IDs. Or visit ${mapUrl} for the full map.`;
      }
    
      return JSON.stringify(result);
    }
  • The definition and input schema for the 'get_avalanche_bulletin' tool.
    {
      name: "get_avalanche_bulletin",
      description:
        "Get the current Swiss avalanche danger bulletin from SLF (WSL Institute for Snow and Avalanche Research). " +
        "Returns current bulletin URLs, danger level descriptions, and links to the interactive map. " +
        "The bulletin is published daily at ~08:00 and updated at ~17:00 Swiss time (October–May).",
      inputSchema: {
        type: "object",
        properties: {
          region: {
            type: "string",
            description:
              "Optional region ID (e.g. CH-9 for Central Graubünden) or region name. " +
              "Use list_avalanche_regions to see all options. If omitted, returns national overview.",
          },
          language: {
            type: "string",
            enum: ["de", "en", "fr", "it"],
            description: "Language for bulletin links: de (German), en (English), fr (French), it (Italian). Default: en",
          },
        },
      },
    },
  • The registration within the main dispatcher where the 'get_avalanche_bulletin' tool is linked to its handler function.
    case "get_avalanche_bulletin":
      return handleGetAvalancheBulletin(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