Skip to main content
Glama

Duo Data Utilities: IBAN, VAT, ISIN Validation API

Business days calculator: add or count working days with your weekend mask and holiday list

business_days_calculate
Read-onlyIdempotent

Business days calculator with a caller-supplied calendar: add or subtract N working days from a date, or count the working days between two dates. The weekend is a weekday mask (Friday-Saturday and Sunday-only weeks work) and holidays are an explicit date list, so nothing depends on a stale holiday table. Returns the result date, the day count and the skipped dates with reasons. The skipped list is capped at 1,000 entries (skipped_truncated flags it); skipped_total is always exact. Price: $0.05 per successful call, paid over x402 (USDC on Base).

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": "business_days_calculate"
  }
}

Input Schema

NameRequiredDescriptionDefault
opNoadd (default) N business days to from, or count business days between from and to. Accepted: add, count.
toNoEnd date YYYY-MM-DD, may precede from. Required when op=count. Accepted: a calendar date as YYYY-MM-DD.
daysNoBusiness days to add, -3650 to 3650. Required when op=add. Accepted: integer between -3650 and 3650.
fromYesStart date, YYYY-MM-DD. Accepted: a calendar date as YYYY-MM-DD.
weekendNoComma-separated weekday names or ISO numbers. Default sat,sun. Empty string = no weekend. Accepted: comma-separated weekday names (mon..sun) or ISO numbers 1-7.
holidaysNoComma-separated YYYY-MM-DD holiday dates. Accepted: comma-separated YYYY-MM-DD dates, at most 2048 characters.
inclusiveNoFor op=count: start (default, half-open [from, to)), both or neither. Accepted: start, both, neither.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changed
    • changedInput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
    • addedInput schema / properties / days / anyOf
      Added value: +[
      +  {
      +    "maximum": 9007199254740991,
      +    "minimum": -9007199254740991,
      +    "type": "integer"
      +  },
      +  {
      +    "type": "string"
      +  }
      +]
    • removedInput schema / properties / days / type
      Removed value: -"string"
  2. Added

TDQS

A4.5/5.0
Behavior5/5

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

Goes well beyond the readOnly/idempotent annotations: it discloses the 1,000-entry cap on the skipped list, the skipped_truncated and skipped_total flags, and the $0.05 per-call price paid over x402 (USDC on Base). These are exactly the cost and limit details an agent needs before calling.

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?

Four tight sentences, front-loaded with purpose, then semantics, then return values, then limits and price. No redundant restatement of the tool name or schema fields, and each clause carries information.

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?

With no output schema, the description steps in and enumerates the returns: result date, day count, and skipped dates with reasons, plus truncation behavior. Combined with the cost and calendar-flexibility notes, nothing essential for a correct call is missing.

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, but the description adds real meaning: the weekend is a weekday mask that supports Friday-Saturday or Sunday-only configurations, and holidays are an explicit date list so no stale holiday table is used. That explains intent behind weekend and holidays beyond their schema wording.

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?

States a specific verb and resource: add or subtract N working days from a date, or count working days between two dates, with a caller-supplied weekend mask and holiday list. This is clearly differentiated from siblings like calendar_convert and dst_transitions, which handle date/time conversion rather than working-day arithmetic.

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?

The two modes (add vs count) are described and the schema keys them to op, so the agent can infer which mode applies. However, there is no explicit guidance on when this tool is preferable to related date utilities, and no stated exclusions or prerequisites.

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.