Skip to main content
Glama

Business Days Calculator API - add working days, count between dates

business_days
Read-onlyIdempotent

Working-day maths with each country's (and state's) public holidays: pass either add (add/subtract N business days, -2000..2000) or end (count business days from start to end, end >= start) — not both and not neither. Uses ISO 3166-1 alpha-2 country codes (2 letters, e.g. DE, BG, US) with per-country historical holiday coverage (e.g. DE/BG from 1991, US from 1777, up to 2100; out-of-range years return 400). Custom weekend weekdays 0=Mon..6=Sun (default 5,6). Returns the holidays that were skipped. < 50 ms. Free: 5 calls/day per IP. Paid: Radar API key (from €15/mo at https://radarbg.com/pricing#starter via X-API-Key) or $0.001/call via x402 at https://radarbg.com/x402/business-days.

Example tool call

This call uses example arguments supplied in the tool’s input schema.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "add": 5,
      "start": "2026-12-22",
      "country": "DE"
    },
    "name": "business_days"
  }
}

Input Schema

NameRequiredDescriptionDefault
addNoBusiness days to add (-2000..2000, negative = back). Pass either add or end, not both.
endNoEnd date YYYY-MM-DD (must be >= start) to count business days between. Pass either add or end, not both.
startNoStart date YYYY-MM-DD (default today; within country holiday coverage)
countryYesISO 3166-1 alpha-2 (2-letter) country code, e.g. DE, BG, US
weekendNoComma-separated weekend weekdays 0=Mon..6=Sun (default 5,6; e.g. 4,5 for Fri-Sat)
subdivisionNoState/region code (optional)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed5 schema fields changed
    • changedInput schema / properties / add / description
      Previous value: -"Business days to add (negative = back)"New value: +"Business days to add (-2000..2000, negative = back). Pass either add or end, not both."
    • changedInput schema / properties / country / description
      Previous value: -"ISO 3166 alpha-2 code, e.g. DE, BG, US"New value: +"ISO 3166-1 alpha-2 (2-letter) country code, e.g. DE, BG, US"
    • changedInput schema / properties / end / description
      Previous value: -"Or an end date YYYY-MM-DD to count business days between"New value: +"End date YYYY-MM-DD (must be >= start) to count business days between. Pass either add or end, not both."
    • changedInput schema / properties / start / description
      Previous value: -"Start date YYYY-MM-DD (default today)"New value: +"Start date YYYY-MM-DD (default today; within country holiday coverage)"
    • changedInput schema / properties / weekend / description
      Previous value: -"Weekend weekdays, 0=Mon..6=Sun, default 5,6"New value: +"Comma-separated weekend weekdays 0=Mon..6=Sun (default 5,6; e.g. 4,5 for Fri-Sat)"
  2. First observed

TDQS

A3.8/5.0
Behavior4/5

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

Annotations cover read-only/idempotent/open-world, but the description adds things they cannot: historical holiday coverage per country, out-of-range years returning 400, latency under 50 ms, free tier of 5 calls/day per IP, and paid auth via X-API-Key or x402. Notably, the description states mutations are impossible and details the error behavior. Remaining edges (what the response body looks like) are covered only partially, but with no output schema the mention of returning skipped holidays helps.

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?

Dense but well-structured: computation, mode rule, parameters, constraints, latency, then pricing/auth. It's a single paragraph with clear sequencing, but it packs pricing and auth into the same sentence chain, which distracts from the invocation essentials.

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?

Covers mode exclusivity, date formats, coverage ranges, weekend defaults, error behavior, pricing tiers, and auth mechanism for a 6-parameter computation tool. Without an output schema it could say more about the response shape, though it does mention returning skipped holidays.

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 already 100%, so baseline is 3; the description adds value by explaining the add/end mutual exclusion rule, the ISO 3166-1 alpha-2 semantics, weekend weekday numbering, and that out-of-range years error. It still doesn't clarify subdivision format beyond 'state/region code', which the schema already vaguely states.

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?

States a specific computation (working-day maths with country/state public holidays) and distinguishes operations by naming `add` vs `end`. The title also names the resource. It doesn't explicitly contrast with the closest sibling, bridge_days_planner, so a 4 rather than 5.

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

Usage Guidelines3/5

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

Explains the internal mode selection (pass either add or end, not both and not neither) which is useful, but gives no guidance on when to pick this tool over date_calculator, due_date_calculator, or bridge_days_planner from the sibling set.

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