Skip to main content
Glama

Business-Day Oracle

Count working days between two dates

working_days_between
Read-onlyIdempotent

Count working days between two dates with endpoint control; lists the non-working days. Leave cost, lateness, elapsed business days. Example: '2026-05-18' → '2026-06-05', country 'AE', inclusive 'both'. Calendar selection: country (ISO 3166-1 alpha-2, e.g. 'SA', 'DE', 'US') or market (MIC, e.g. 'XNYS', 'XLON'); optional subdivision (state/province/emirate code from list_calendars), categories (e.g. ['public','bank']), weekend override (['FRI','SAT']), extra_holidays (company/contract dates). Weekend defaults to the country's legal weekend. Response: result plus data_confidence (high = fixed-date calendar; medium = a lunar/moon-sighted or projected holiday is involved, or the caller overrode the weekend), estimated_items[] naming each projected date, sources[] (public references behind the calendar), data_version and warnings[].

Input Schema

NameRequiredDescriptionDefault
marketNoFinancial market MIC (XNYS, XLON, XETR, XHKG, XJPX, XSAU…) — trading/settlement calendar instead of a country.
countryNoISO 3166-1 alpha-2 country code. Required unless market is given.
weekendNoOverride the weekend, e.g. ['FRI','SAT'] or ['SUN']. Default: the country's legal weekend.
end_dateYesISO date; may be before start_date (negative result).
languageNoLanguage for holiday names where available (e.g. 'ar', 'de', 'en_US'). Default: the country's own.
inclusiveNoWhich endpoints count: both (default) | start | end | none.both
categoriesNoHoliday categories to count as non-working; default ['public']. Others per country: bank, government, school, optional, half_day, catholic…
start_dateYesISO date.
subdivisionNoSub-national code (US 'CA', DE 'BY', AE 'DU', CA 'ON', AU 'NSW', IN 'KA'…). See list_calendars.
extra_holidaysNoAdditional non-working ISO dates (company closures, contract-specific days).
include_estimated_holidaysNoCount projected lunar/moon-sighted holidays as non-working (true) or ignore them until announced (false).

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.6/5.0
Behavior4/5

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

Annotations already carry readOnly/idempotent/non-destructive, and the description goes well beyond them: it discloses the default weekend rule, the data_confidence high/medium semantics tied to lunar or overridden weekends, and the presence of estimated_items, sources, data_version and warnings. This is substantive behavioral context; it stops short of stating rate limits or what happens for invalid/unknown country codes.

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

Conciseness3/5

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

The opening sentence is front-loaded and useful, but the third sentence 'Leave cost, lateness, elapsed business days' is a malformed fragment that adds noise and ambiguity, and the description then becomes a dense run-on of parameter and response detail. Several clauses duplicate schema content that could be trimmed.

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 an 11-parameter calendar tool with an output schema and full annotations, the description covers calendar selection, weekend defaults, confidence semantics and returned fields. The only real gap is that the confusing 'Leave cost, lateness...' clause leaves it unclear whether certain cost/lateness concepts are deliberately out of scope.

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 description coverage is 100%, so country, market, weekend, categories, subdivision, extra_holidays and include_estimated_holidays are already fully documented in the schema. The description largely restates those with an example ('AE', inclusive 'both'), adding modest value such as pointing to list_calendars for subdivision codes — baseline 3 is appropriate.

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 verb+resource ('Count working days between two dates') with scope qualifier 'with endpoint control' and notes it also lists the non-working days. It is distinguishable from siblings like add_working_days and is_working_day by implication, but it never names them or contrasts the operation explicitly.

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?

Usage is only implied: calendar selection guidance (country OR market, plus optional subdivision/categories) tells the agent how to pick a calendar, but there is no explicit statement of when to use this versus compute_deadline or roll_date. The garbled fragment 'Leave cost, lateness, elapsed business days' reads like an attempted exclusion list but is too broken to function as guidance.

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