Skip to main content
Glama
fbdo

business-day-mcp

by fbdo

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.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
yearYes
monthYes
countryYes
subdivNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior5/5

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

With no annotations, the description fully explains behavior: walking backward, skipping weekends and holidays, handling errors, and subdiv case-sensitivity. This leaves minimal ambiguity for the agent.

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 well-structured with paragraphs for overview, then standard Args/Returns/Raises sections. Every sentence adds value without redundancy.

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

Completeness5/5

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

Given the tool's complexity (4 parameters, output schema, error handling), the description covers all necessary aspects: use case, algorithm, parameter details, return format, and error conditions. It is fully complete.

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

Parameters5/5

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

Schema coverage is 0%, so the description compensates by detailing each parameter: year (4-digit), month (1-12), country (ISO code, case-insensitive), subdiv (optional, case-sensitive, reference to get_supported_countries). This adds value beyond the schema.

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

Purpose4/5

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

The description clearly states the tool returns the last business day of a given month, with specific use cases. However, it does not explicitly differentiate from sibling tools like previous_business_day or next_business_day, which could cause confusion.

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

Usage Guidelines4/5

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

The description provides explicit use cases (end-of-month billing, reporting, settlement) and mentions the algorithm (walks backward). It lacks when-not-to-use or alternative tools, but the guidance is clear enough.

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/fbdo/business-day-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server