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. Optional holiday jurisdiction or custom calendar, and a selectable working week.

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

A3.7/5.0
Behavior4/5

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

The description discloses important behavioral specifics: the span mode is 'exclusive of the start day, inclusive of the end day', and add mode returns 'the date N business days away'. It also notes the optional holiday jurisdiction/custom calendar and selectable working week. These go beyond the readOnlyHint and idempotentHint annotations, which already indicate safety, so the description adds value without contradiction.

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?

Two sentences with zero filler. The first sentence front-loads the two primary modes and their boundary rules, the second covers optional configurations. Every clause contributes meaning, making it highly efficient and easy to parse.

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 parameters, two modes, output schema present), the description covers the key operational aspects: boundary inclusivity, mode selection, and optional holiday/workweek handling. It doesn't explain return values, but the output schema handles that. Timezone handling is in the schema, so nothing critical is missing for a read-only 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. The description adds semantic grouping by explicitly defining two modes (span via 'from' and 'to', add via 'days' and optional 'date') and mentions the optional holiday/workweek parameters. This helps the agent understand parameter relationships beyond the schema's individual descriptions.

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?

The description clearly states two modes (span and add) with specific behaviors: 'business days between two dates' and 'date N business days away'. It also mentions optional holiday/workweek options. However, it does not explicitly distinguish itself from siblings like days_between or add_days, which could overlap, so it loses a point for not addressing sibling differentiation.

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

Usage Guidelines2/5

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

The description implies usage through its mode descriptions but provides no explicit guidance on when to choose this tool over alternatives. It never mentions days_between, add_days, or other siblings, nor any conditions for when not to use it. The absence of any routing or exclusions leaves the agent to infer context.

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