Skip to main content

public_holiday_check

Check whether a specific date is a public holiday in a given country. Returns the holiday name and local name when a match is found, or is_holiday: false when the date is not a public holiday.

Holiday data is sourced from the Nager.Date public API, which covers 115+ countries.

Parameters​

ParameterTypeRequiredDescription
datestringYesISO 8601 date to check, e.g. "2026-12-25".
country_codestringYesISO 3166-1 alpha-2 country code, e.g. "US", "DE", or "FR".

Response​

FieldTypeDescription
is_holidaybooleantrue when the date is a public holiday in the given country, otherwise false.
holiday_namestringEnglish name of the holiday. Present only when is_holiday is true.
local_namestringName of the holiday in the local language. Present only when is_holiday is true.
globalbooleantrue when the holiday is observed nationwide. Present only when is_holiday is true.

Examples​

Date that is a public holiday​

{
"date": "2026-12-25",
"country_code": "US"
}

Result:

{
"is_holiday": true,
"holiday_name": "Christmas Day",
"local_name": "Christmas Day",
"global": true
}

Date that is not a public holiday​

{
"date": "2026-03-15",
"country_code": "US"
}

Result:

{
"is_holiday": false
}

Holiday with a distinct local name​

{
"date": "2026-12-25",
"country_code": "DE"
}

Result:

{
"is_holiday": true,
"holiday_name": "Christmas Day",
"local_name": "Erster Weihnachtstag",
"global": true
}

Errors​

Each failure carries a precise code in the response. Argument-schema and server errors are JSON-RPC protocol errors; a rejected value is returned as a tool result with isError: true (so the agent can read the code and self-correct).

CodeWhenDelivered as
invalid_argumentsAn argument is missing or the wrong type.protocol error (invalid_params)
invalid_datetimedate is not a valid ISO 8601 date (e.g. missing year, wrong format).tool error (isError)
invalid_countrycountry_code is not supported by the holiday data provider.tool error (isError)
internal_errorAn unexpected server error.protocol error (internal_error)

Notes​

  • The global field indicates whether the holiday is observed nationwide. Some holidays (e.g. regional or state-level holidays) have global: false — this tool returns them too.
  • Supported country codes include US, GB, DE, FR, JP, AU, CA, BR, and 100+ others. See Nager.Date available countries for the full list.
  • Holiday data is fetched from the Nager.Date API at call time and cached in memory for the lifetime of the server process. The first call for a given country and year incurs a network round-trip; subsequent calls are served from the cache.