last_business_day_of_month
Find the last working day of a month for any country by skipping weekends and holidays, ensuring billing and reporting dates land on valid business days.
Instructions
Return the last business day of a given month for a country.
Use this for end-of-month billing, reporting, or settlement dates that must land on a working day. Walks backward from the last calendar day, skipping weekends and holidays.
Args: year: Four-digit year (e.g. 2026). month: Month 1-12. country: ISO 3166-1 alpha-2 code (case-insensitive, normalized to upper). subdiv: Optional country-specific subdivision code (case-sensitive; see get_supported_countries). When omitted, only nation-wide holidays are considered.
Returns: dict with keys: year, month, country, subdiv (only if provided), last_business_day (YYYY-MM-DD), last_calendar_day (YYYY-MM-DD).
Raises: ValueError: on invalid month, unknown country/subdiv.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"year": "<year>",
"month": "<month>",
"country": "<country>"
},
"name": "last_business_day_of_month"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| year | Yes | ||
| month | Yes | ||
| country | Yes | ||
| subdiv | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||