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.",
          },
        },
      },
    },
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden. It mentions the return format 'holiday periods (start/end dates) by canton', which adds value beyond the input schema. However, it lacks details on data sources, update frequency, error handling, or any rate limits or authentication requirements, leaving behavioral gaps.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, well-structured sentence that efficiently conveys purpose, parameters, and output. It is front-loaded with the main action and includes no redundant information, making it highly concise.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's low complexity (2 parameters, no annotations, no output schema), the description covers the basics: what it does, key parameters, and return format. However, without annotations or output schema, it lacks details on behavioral aspects like data freshness or error cases, making it adequate but not fully complete.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema already documents both parameters thoroughly. The description adds marginal value by reinforcing the optional canton filtering and return structure, but does not provide additional syntax or format details beyond what the schema specifies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb 'Get' and resource 'Swiss school holidays', specifies the scope 'for a given year', and distinguishes from siblings by mentioning optional canton filtering. It directly addresses what the tool does without being tautological.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage when school holiday data is needed, and the parameter description for 'canton' mentions 'If omitted, returns school holidays for all cantons', providing some contextual guidance. However, it lacks explicit when-to-use guidance compared to alternatives like 'get_public_holidays' or 'is_holiday_today'.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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