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
| Name | Required | Description | Default |
|---|---|---|---|
| canton | No | Filter regions by canton abbreviation (e.g. GR, VS, BE). Optional. |
Implementation Reference
- src/modules/avalanche.ts:191-215 (handler)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); } - src/modules/avalanche.ts:109-124 (schema)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.", }, }, }, }, - src/modules/avalanche.ts:226-227 (registration)The registration of 'list_avalanche_regions' in the avalanche tool dispatcher.
case "list_avalanche_regions": return handleListAvalancheRegions(args);