Skip to main content
Glama

Agent Data Tools: Utilities

Business days between dates, working days calculator: count working days between two dates, skipping weekends and public holidays

date_business_days
Read-only

Count business (working) days between two dates, skipping weekends and the nationwide public holidays of over 100 countries (our statutory rules for US, UK, SE, DE, FR, NO, DK, FI; Nager.Date for the rest, e.g. JP, NZ, CA, AU, IN), and list the holidays skipped; or give add=N for the date N business days after (or before) a date. Use for delivery estimates, SLAs, payment terms and payroll dates. Example: from=2026-12-01. Price $0.01/call via x402 USDC or a card key (/credits), first 10 free; failed calls free. Reads or computes only and changes nothing; each call is charged, so repeats are not free.

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": {
      "from": "<from>"
    },
    "name": "date_business_days"
  }
}

Input Schema

NameRequiredDescriptionDefault
toNoEnd date, YYYY-MM-DD (inclusive; default: the last day of the start month); or use add
addNoBusiness days to add to from (negative to go back), instead of to
fromYesStart date, YYYY-MM-DD
countryNoHoliday calendar: a 2-letter country code or English name, e.g. SE, JP, New Zealand (default: weekends only)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • changedInput schema / properties / add / maximum
      Previous value: -9007199254740991New value: +100000
    • changedInput schema / properties / add / minimum
      Previous value: --9007199254740991New value: +-100000
  2. Changed1 schema field changed
    • changedInput schema / properties / country / description
      Previous value: -"Holiday calendar: US, GB, SE, DE, FR, NO, DK or FI (default: weekends only)"New value: +"Holiday calendar: a 2-letter country code or English name, e.g. SE, JP, New Zealand (default: weekends only)"
  3. Added

TDQS

A4.3/5.0
Behavior5/5

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

Beyond the annotations, it discloses holiday-data sources and country coverage, says holidays skipped are listed, explains the add=N mode, and states the per-call pricing and free-call/failed-call rules. It also reinforces that the tool reads or computes only and changes nothing, consistent with the read-only annotation.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The core purpose and both modes are front-loaded, and the sentence is dense but organized. It is longer than necessary because the provider/source list and pricing details are packed into the main description, but those details still earn some place.

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

Completeness4/5

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

For a no-output-schema tool, it explains the main outcomes: a business-day count, listed skipped holidays, and a resulting date when using add. It does not specify the exact response shape or clarify whether public holidays are skipped when country is omitted, but the schema covers that default.

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

Parameters3/5

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

Schema coverage is 100%, so from, to, add, and country are already fully documented, including formats and the country default. The description adds useful context about holiday sources and gives an example, but it largely restates the schema's parameter semantics rather than adding detailed meaning beyond it.

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 specific verb and resource: count business/working days between two dates, with add=N as a second mode. It clearly frames the result as business days that skip weekends and public holidays, which distinguishes it from ordinary date-difference or date-add tools.

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 gives clear usage contexts such as delivery estimates, SLAs, payment terms, and payroll dates. It does not explicitly name when to use date_diff/date_add-style siblings instead, so it stops short of full alternative routing.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources