list_cantons
Retrieve all Swiss cantons and their official codes for data integration and geographic reference.
Instructions
List all Swiss cantons with their codes
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/modules/companies.ts:112-131 (handler)The handler for the 'list_cantons' tool, which returns a hardcoded list of Swiss cantons.
case "list_cantons": { // ZEFIX /cantons and /legalForms endpoints require authentication (403). // Return hardcoded authoritative list instead. const cantons = [ { code: "AG", name: "Aargau" }, { code: "AI", name: "Appenzell Innerrhoden" }, { code: "AR", name: "Appenzell Ausserrhoden" }, { code: "BE", name: "Bern" }, { code: "BL", name: "Basel-Landschaft" }, { code: "BS", name: "Basel-Stadt" }, { code: "FR", name: "Fribourg" }, { code: "GE", name: "Geneva" }, { code: "GL", name: "Glarus" }, { code: "GR", name: "Graubünden" }, { code: "JU", name: "Jura" }, { code: "LU", name: "Lucerne" }, { code: "NE", name: "Neuchâtel" }, { code: "NW", name: "Nidwalden" }, { code: "OW", name: "Obwalden" }, { code: "SG", name: "St. Gallen" }, { code: "SH", name: "Schaffhausen" }, { code: "SO", name: "Solothurn" }, { code: "SZ", name: "Schwyz" }, { code: "TG", name: "Thurgau" }, { code: "TI", name: "Ticino" }, { code: "UR", name: "Uri" }, { code: "VD", name: "Vaud" }, { code: "VS", name: "Valais" }, { code: "ZG", name: "Zug" }, { code: "ZH", name: "Zürich" }, ]; return JSON.stringify(cantons, null, 2); } - src/modules/companies.ts:44-50 (registration)Definition and registration of the 'list_cantons' tool in the companiesTools array.
name: "list_cantons", description: "List all Swiss cantons with their codes", inputSchema: { type: "object", properties: {}, }, },