Skip to main content
Glama

count_business_days

Count business days between two dates (inclusive) by excluding weekends and Polish public holidays. Supports enforcing '14-dni-roboczych' payment terms.

Instructions

Count business days between two dates (inclusive), skipping weekends and Polish public holidays. Useful for enforcing '14-dni-roboczych' style payment terms. The weekend is always Saturday + Sunday, whatever country is passed; only the holiday list changes per country.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
countryNoISO 3166-1 alpha-2 country code for the holiday list (default PL); does not change the Sat/Sun weekendPL
to_dateYesYYYY-MM-DD (inclusive)
from_dateYesYYYY-MM-DD (inclusive)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.5/5.0
Behavior4/5

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

With no annotations, the description carries the behavioral burden. It does well by disclosing that both dates are inclusive, that the weekend is always Saturday+Sunday regardless of country, and that country only changes the holiday list. It could add edge-case behavior such as reversed date order, but the core semantics are transparent.

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?

Three tight sentences: core behavior first, then a practical use case, then a clarification of the most likely misinterpretation. Every sentence carries meaning and no information is wasted.

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?

For a small deterministic counting tool, the definition is complete. The input schema covers formats and required fields, while the description explains the two potentially surprising aspects: inclusive bounds and weekend handling independent of country. The return value is implied by the verb 'count', and no output schema exists to reconcile.

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

Parameters4/5

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

Schema coverage is 100%, so the baseline is 3. The description adds value by reinforcing that both dates are inclusive and by clarifying that the country parameter affects only holidays, not the weekend definition. This supplements the schema and reduces the chance of misusing the country parameter.

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

Purpose5/5

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

The description states a precise verb-resource pair: count business days between two inclusive dates, skipping weekends and Polish public holidays. It clearly differentiates from siblings like list_holidays, is_business_day, and add_business_days because it is the only counting tool in the group.

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?

It provides a concrete application context (enforcing '14-dni-roboczych' payment terms) that signals when counting business days is the right operation. However, it does not explicitly name sibling alternatives or state when not to use it, so it stops short of full routing guidance.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.