Skip to main content
Glama

get_school_holidays

Retrieve Swiss school holiday dates for any year, with optional canton filtering. Provides start and end dates for holiday periods across Switzerland.

Instructions

Get Swiss school holidays for a given year, optionally filtered by canton. Returns holiday periods (start/end dates) by canton.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
yearYesYear (e.g. 2026)
cantonNoTwo-letter canton code (e.g. ZH, BE, GE, BS, TI). If omitted, returns school holidays for all cantons.

Implementation Reference

  • The handler logic for 'get_school_holidays' which calls the OpenHolidays API for school holidays.
    case "get_school_holidays": {
      const year = args.year as number;
      const canton = args.canton as string | undefined;
    
      const params: Record<string, string> = {
        countryIsoCode: "CH",
        languageIsoCode: "EN",
        validFrom: `${year}-01-01`,
        validTo: `${year}-12-31`,
      };
      if (canton) {
        params.subdivisionCode = toSubdivisionCode(canton);
      }
    
      const url = buildUrl(`${BASE}/SchoolHolidays`, params);
      const data = await fetchJSON<Holiday[]>(url);
    
      const holidays = data.map(compactHoliday);
      return JSON.stringify({
        year,
        canton: canton ?? "all",
        count: holidays.length,
        holidays,
        source: "openholidaysapi.org",
      });
    }
  • Tool registration and input schema for 'get_school_holidays'.
    {
      name: "get_school_holidays",
      description:
        "Get Swiss school holidays for a given year, optionally filtered by canton. Returns holiday periods (start/end dates) by canton.",
      inputSchema: {
        type: "object",
        required: ["year"],
        properties: {
          year: { type: "number", description: "Year (e.g. 2026)" },
          canton: {
            type: "string",
            description:
              "Two-letter canton code (e.g. ZH, BE, GE, BS, TI). If omitted, returns school holidays for all cantons.",
          },
        },
      },
    },

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