Skip to main content
Glama

Duo Data Utilities: IBAN, ISIN, VAT & Tax ID, Barcode, Timezone, Geo APIs

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).

Input Schema

TableJSON 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. Added

TDQS

A4.3/5.0
Behavior5/5

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

Annotations already cover read-only/idempotent/no-open-world, and the description goes well beyond them: it discloses the return contents (result date, day count, skipped dates with reasons), the 1,000-entry truncation cap with skipped_truncated flag and exact skipped_total, and the $0.05 x402/USDC-on-Base pricing requirement. That is exactly the operational context annotations cannot express.

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?

Four sentences, all front-loaded and information-dense: capability first, then calendar semantics, then output/truncation behavior, then pricing. No filler, though the pricing sentence is appended without transition and packs several facts.

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?

With no output schema, the description does the heavy lifting by summarizing return fields and truncation flags, and it covers both operations, the weekend/holiday model, and payment. A full field-level return spec and pagination/count semantics are not given, leaving a small gap for a 7-parameter tool.

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 meaning beyond the schema: it explains that the weekend mask supports non-standard weeks (Friday-Saturday, Sunday-only) and that holidays are an explicit list so nothing relies on a stale table. That is genuine semantic value for the weekend and holidays parameters.

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 specific verbs and resource ('business days calculator... add or subtract N working days... or count the working days between two dates') and immediately frames the caller-supplied calendar, which separates it from siblings like calendar_convert, dst_transitions and rrule_expand. An agent can identify the tool's job without opening the schema.

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 description distinguishes the two modes (add vs count) and notes the calendar is caller-supplied, so usage is implied, but it never names an alternative tool or states when this is the wrong choice versus recurrence or conversion tools. Implied usage only.

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.