Skip to main content
Glama

Business-Day Oracle

Compute a deadline with an explanation trail

compute_deadline
Read-onlyIdempotent

Compute the end of a period ('within 30 calendar days', '10 working days', '3 months') from a start date under explicit counting rules, roll it by the chosen convention when it lands on a non-working day, and return raw vs final deadline, skipped days and a step-by-step explanation plus a disclaimer. Pass the rules the contract/law states; defaults are the common ones. Example: start_date '2026-11-26', period 7, unit 'calendar_days', country 'GB'. 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
unitYescalendar_days | working_days | months.
marketNoFinancial market MIC (XNYS, XLON, XETR, XHKG, XJPX, XSAU…) — trading/settlement calendar instead of a country.
periodYesLength of the period; negative counts backwards.
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.
languageNoLanguage for holiday names where available (e.g. 'ar', 'de', 'en_US'). Default: the country's own.
categoriesNoHoliday categories to count as non-working; default ['public']. Others per country: bank, government, school, optional, half_day, catholic…
conventionNoWhat to do when the raw deadline lands on a non-working day. Default following (roll to the next working day); 'none' leaves it.following
start_dateYesISO date the period runs from (service, invoice, filing 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).
month_end_clampNoFor months: clamp 31 Jan + 1 month to 28/29 Feb (true) or overflow into March (false).
exclude_start_dayNoDay 1 is the day after start_date (true, the common convention) or start_date itself (false).
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

A4/5.0
Behavior5/5

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

Annotations already cover read-only/idempotent/non-destructive, and the description still adds substantive behavior: what the response contains (raw vs final deadline, skipped days, explanation trail, disclaimer), the data_confidence levels and what triggers medium confidence, estimated_items, sources and warnings. That is exactly the kind of context annotations cannot carry.

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?

Front-loaded with the purpose and the counting/rolling behavior, then calendar selection, then response shape; every block earns its place for a 14-parameter tool. It is dense and long-winded in places (the response sentence is a run-on), which keeps it from a 5.

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?

Given 14 parameters and an output schema, the description supplies the decision logic (which calendar source, how confidence is derived, what warnings mean) that structured fields do not. Slight redundancy in re-explaining return fields already covered by the output schema, and no negative guidance about sibling tools.

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; the description still adds cross-field meaning — country OR market selects the calendar, subdivision codes come from list_calendars, weekend defaults to the country's legal weekend, extra_holidays are company/contract dates — plus a worked example. It stops short of explaining exclude_start_day or month_end_clamp, which only the schema covers.

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?

Names a specific verb and resource ('Compute the end of a period ... from a start date') and enumerates the counting, rolling and explanation behaviors, so the operation is unambiguous. It never names a sibling (add_working_days, roll_date, working_days_between) to draw the boundary, so it falls short of full differentiation.

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?

'Pass the rules the contract/law states; defaults are the common ones' gives a context for use, and the calendar-selection sentence hints at inputs. But there is no explicit when/when-not guidance and no routing to roll_date or add_working_days, so the agent must infer which sibling to call.

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