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
| Parameter | Type | Required | Description |
|---|---|---|---|
date | string | Yes | ISO 8601 date to check, e.g. "2026-12-25". |
country_code | string | Yes | ISO 3166-1 alpha-2 country code, e.g. "US", "DE", or "FR". |
Response
| Field | Type | Description |
|---|---|---|
is_holiday | boolean | true when the date is a public holiday in the given country, otherwise false. |
holiday_name | string | English name of the holiday. Present only when is_holiday is true. |
local_name | string | Name of the holiday in the local language. Present only when is_holiday is true. |
global | boolean | true 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).
| Code | When | Delivered as |
|---|---|---|
invalid_arguments | An argument is missing or the wrong type. | protocol error (invalid_params) |
invalid_datetime | date is not a valid ISO 8601 date (e.g. missing year, wrong format). | tool error (isError) |
invalid_country | country_code is not supported by the holiday data provider. | tool error (isError) |
internal_error | An unexpected server error. | protocol error (internal_error) |
Notes
- The
globalfield indicates whether the holiday is observed nationwide. Some holidays (e.g. regional or state-level holidays) haveglobal: 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.