next_workday
Return the next workday date from today, skipping weekends and public holidays in a given country. A workday is defined as a Monday through Friday that is not a public holiday.
Holiday data is sourced from the Nager.Date public API, which covers 115+ countries.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
country_code | string | Yes | ISO 3166-1 alpha-2 country code used to look up public holidays, e.g. "US", "DE", or "FR". |
timezone | string | No | IANA timezone name used to determine what "today" is, e.g. "America/New_York" or "Europe/Berlin". When omitted, UTC is used. |
global_only | boolean | No | When true, only nationwide holidays count as non-working days; regional holidays are ignored. Defaults to false. |
Response
| Field | Type | Description |
|---|---|---|
date | string | The next workday as an ISO 8601 date string, e.g. "2026-04-14". |
weekday | string | Full English weekday name of the next workday, e.g. "Tuesday". |
days_from_today | integer | Number of calendar days from today until the next workday. 1 means tomorrow, 2 means the day after, etc. |
holidays_skipped | array of string | Names of public holidays that were skipped to reach the next workday. Empty when only weekends were skipped (or none at all). |
Examples
Regular case — next workday is tomorrow
{
"country_code": "US"
}
Result (run on a Monday):
{
"date": "2026-04-14",
"weekday": "Tuesday",
"days_from_today": 1,
"holidays_skipped": []
}
Friday — next workday is the following Monday
{
"country_code": "DE"
}
Result (run on a Friday):
{
"date": "2026-04-20",
"weekday": "Monday",
"days_from_today": 3,
"holidays_skipped": []
}
Public holiday skipped
{
"country_code": "US"
}
Result (run on Thursday 2026-12-24 — Christmas Eve):
{
"date": "2026-12-28",
"weekday": "Monday",
"days_from_today": 4,
"holidays_skipped": ["Christmas Day"]
}
With timezone
{
"country_code": "JP",
"timezone": "Asia/Tokyo"
}
Result (run on 2026-04-14, a Tuesday in Tokyo):
{
"date": "2026-04-15",
"weekday": "Wednesday",
"days_from_today": 1,
"holidays_skipped": []
}
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_country | country_code is not supported by the holiday data provider. | tool error (isError) |
invalid_timezone | timezone is not a valid IANA timezone name. | tool error (isError) |
internal_error | An unexpected server error. | protocol error (internal_error) |
Notes
- "Today" is resolved in the given
timezone(or UTC if omitted). This matters when it is late evening in one timezone and already the next calendar day in another. - The
global_onlyflag mirrors the same parameter onis_workday,public_holidays_list, andpublic_holidays_in_range. Set it totrueif you want to treat only nationwide holidays as non-working days and ignore state- or region-level holidays. - The tool looks up to 14 days ahead. This is sufficient for any real-world run of consecutive public holidays.
- Supported country codes include
US,GB,DE,FR,JP,AU,CA,BR, and 100+ others. See Nager.Date available countries for the full list.