Skip to main content
Glama

Business-day calculations

business_days
Read-onlyIdempotent

Span mode (from+to): business days between two dates, exclusive of the start day, inclusive of the end day. Add mode (days, optional date): the date N business days away. Passing from or to selects span mode and needs both; days and date are then ignored, so add mode takes its start date in date, not from. Optional holiday jurisdiction or custom calendar, and a selectable working week. For calendar days use add_days, subtract_days or days_between.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
toNoISO date YYYY-MM-DD, or "today" (resolved in tz)
tzNoIANA timezone that defines "today" (e.g. Africa/Kampala). Default UTC.UTC
dateNoISO date YYYY-MM-DD, or "today" (resolved in tz)
daysNoAdd mode: business days to move. Negative counts backwards.
fromNoISO date YYYY-MM-DD, or "today" (resolved in tz)
workweekNoWorking week. Default mon-fri (Sat+Sun weekend).
jurisdictionNoHoliday jurisdiction id: US, GB, GB-SCT, GB-NIR, IE, FR, CA, AU, UG (alias UK for GB). No default: omit for no holiday calendar.
customHolidaysNoCustom organizational holiday calendar as ISO dates (mutually exclusive with jurisdiction)

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
answerYesThe calculated answer (kind-discriminated)
receiptYesAuditable receipt: inputs, timezone, convention, workweek, holiday calendar, exclusions, versions, stable result ID

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed7 schema fields changed
    • removedInput schema / properties / date / $ref
      Removed value: -"#/properties/from"
    • addedInput schema / properties / date / pattern
      Added value: +"^(\\d{4}-\\d{2}-\\d{2}|today)$"
    • addedInput schema / properties / date / type
      Added value: +"string"
    • addedInput schema / properties / days / description
      Added value: +"Add mode: business days to move. Negative counts backwards."
    • removedInput schema / properties / to / $ref
      Removed value: -"#/properties/from"
    • addedInput schema / properties / to / pattern
      Added value: +"^(\\d{4}-\\d{2}-\\d{2}|today)$"
    • addedInput schema / properties / to / type
      Added value: +"string"
  2. First observed

TDQS

A4.5/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint, and destructiveHint, covering safety. The description goes further by explaining nuanced behavior: exclusive start, inclusive end, and that days/date are ignored in span mode—something not evident from annotations or schema alone. It adds meaningful behavioral context without contradicting annotations.

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?

The description is ~100 words and front-loads the two modes. Every sentence earns its place—mode definitions, parameter precedence, and alternative tool routing. It is efficient, though slightly dense, which prevents a perfect score.

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 the tool's complexity (8 params, two modes, mutual exclusions) and the presence of a rich input schema and output schema, the description covers all essential usage logic. Minor details like default workweek and holiday jurisdiction behavior are left to schema descriptions, but the description sufficiently frames the tool's purpose and boundaries.

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 each parameter has individual descriptions. However, the description explains the critical interactions between parameters (mode selection, ignoring of days/date in span mode) that cannot be inferred from individual property descriptions. This adds significant semantic value beyond the schema.

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?

The description clearly specifies a verb ('calculate') and resource ('business days') with two distinct modes: span mode (between two dates) and add mode (N business days away). It also distinguishes itself from sibling tools by explicitly naming calendar-day alternatives. This is unambiguous and specific.

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

Usage Guidelines5/5

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

It provides explicit conditions for each mode ('Passing from or to selects span mode... add mode takes its start date in date, not from') and directs users to alternative tools for calendar days ('For calendar days use add_days, subtract_days or days_between'). This is clear, actionable guidance on when to use this tool versus others.

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