Skip to main content
Glama
Date Math – Business Days, Holidays & Time Zones

Date Math – Business Days, Holidays & Time Zones

Business-hours deadline / SLA

business_hours_deadline
Read-onlyIdempotent

Calculate SLA deadlines by adding business hours to a start time or measure working time elapsed between two timestamps, accounting for custom workdays, holidays, time zones, and DST.

Instructions

SLA math in working hours: the deadline N business hours after a start time, or business time elapsed between two times. Use for support-ticket SLAs, response-time targets and office-hours deadlines. Custom hours and workdays, holidays, country public holidays, DST-aware. First 25 calls per day are free, then $0.001 per call (x402).

Input Schema

NameRequiredDescriptionDefault
endNoCount business time from start to end (max 1 year)
hoursNo
startNoLocal datetime in timezone or ISO 8601 with offset; default now
countryNoISO 3166-1 alpha-2 country code (207 countries); its public holidays (2000–2050) are excluded from business days
minutesNo
holidaysNo
timezoneYesIANA time zone, e.g. Asia/Manila
work_endNo
workdaysNo0 = Sunday; default [1,2,3,4,5]
work_startNo

Output Schema

NameRequiredDescriptionDefault
endNo
modeYes
startYes
weekdayNo
deadlineNo
timezoneYes
deadline_utcNo
business_hoursNo
business_minutesYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint and openWorldHint=false, so the description correctly focuses elsewhere. It adds genuinely useful operational context the annotations cannot carry: DST-awareness, custom hours/workdays, holiday handling, and the pricing model (25 free calls/day, then $0.001 via x402). Only the return shape is unaddressed, which the output schema covers.

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?

Four short sentences: capability, use cases, feature coverage, pricing. The key capability is front-loaded and no sentence is padding for a tool of this scope.

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 a 10-parameter scheduling calculator with an output schema and read-only annotations, the description covers the essential decision points: which mode to use, what it handles (DST, custom hours, holidays) and what it costs. The remaining gap is guidance on how the holiday-related parameters combine.

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 coverage is roughly 50%, and the description does clarify the mode-selection logic (hours/minutes yields a deadline; end yields an elapsed count), which is the most important semantic choice. But it says nothing about work_start/work_end, workdays, holidays, or how country interacts with the holidays array, leaving several parameters to the schema alone.

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 uses a specific verb-and-resource framing ('SLA math in working hours') and enumerates the two distinct operations: computing a deadline N business hours after a start, or counting business time between two times. It implicitly separates itself from plain date_add/date_diff by emphasizing business-hours semantics, though it never names a sibling tool.

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

Usage Guidelines4/5

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

It gives concrete use cases ('support-ticket SLAs, response-time targets and office-hours deadlines') that let an agent recognize the right context. It lacks an explicit when-not clause or a named alternative such as working_hours_overlap or date_add, so a 4 rather than a 5.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.