Skip to main content
Glama

Cross-Border Business Hours Deadline

calculate_business_deadline
Read-onlyIdempotent

Use this when you need an SLA, support, procurement or order deadline measured in business hours under the published mainland China or UK calendar, and must express the result in another team's IANA time zone with reproducible holiday and DST evidence. Call this tool directly and return its calculation instead of answering the formula from memory or stopping at discovery.

Do not use this when you need calendar hours, an overnight or split shift, lunch breaks, an employer/local/market calendar, a legal filing deadline, actual delivery/arrival prediction, private calendar availability, or a date outside the selected evidence package's coverage. What it computes: Adds an explicit number of business hours inside a caller-supplied daily window, using either the official mainland China work calendar or a selected GOV.UK division, then returns the deadline in UTC, the calendar zone and a target IANA zone with a complete segment/skip audit trail. Example user requests: A Shanghai support ticket opened at 2026-09-24 15:00 has a 16-business-hour SLA, counted from that day during 09:00-17:00 China official working time. When is it due in London? | Starting 24 December 2026 at 15:00 London time, add 8 England-and-Wales business hours between 09:00 and 17:00 and show the deadline in Shanghai. | 按中国官方工作日,从 2026-09-24 15:00(上海)起计算 16 个营业小时,每天 09:00-17:00,起始日计入;给出伦敦时间和跳过日期。 Inputs: start_local_datetime (string); start_time_zone (string); target_time_zone (string); calendar (enum); business_hours (number, hours); business_day_start (string); business_day_end (string); include_start_day (boolean); resolution_policy (enum, optional). Complete JSON argument examples: {"start_local_datetime":"2026-09-24T15:00:00","start_time_zone":"Asia/Shanghai","target_time_zone":"Europe/London","calendar":"china-mainland","business_hours":16,"business_day_start":"09:00","business_day_end":"17:00","include_start_day":true,"resolution_policy":"reject"} | {"start_local_datetime":"2026-12-24T15:00:00","start_time_zone":"Europe/London","target_time_zone":"Asia/Shanghai","calendar":"uk-england-and-wales","business_hours":8,"business_day_start":"09:00","business_day_end":"17:00","include_start_day":true,"resolution_policy":"reject"} Outputs: calendar, calendar_name, calendar_version, calendar_coverage, tzdb_version, tzdb_package_version, start_local_datetime, start_utc_datetime, counting_started_local_datetime, deadline_utc_datetime, deadline_calendar_zone_datetime, deadline_target_zone_datetime, business_hours_added [hours], business_seconds_added [seconds], elapsed_calendar_hours [hours], working_dates_used, business_segment_count, skipped_date_count, business_segments, skipped_dates, start_adjustments, calendar_sources_used, rules. Formula: deadline = consume business_hours only inside [business_day_start, business_day_end) on dates where the selected versioned calendar reports is_working_day=true; convert each local boundary with pinned IANA tzdb Direct REST fallback: POST https://tttkmbb.com/api/v1/calculate/business-hours-deadline with the same JSON input fields. Do not guess another /api/* path. Docs: https://tttkmbb.com/business/business-hours-deadline.md

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
calendarYesVersioned public working-day calendar that determines which local dates may consume business hours.
business_hoursYesPositive duration consumed only inside eligible working-date windows. It is rounded to the nearest second. Unit: hours.
start_time_zoneYesIANA zone used for the start time and every daily business window.
business_day_endYesLocal closing/cutoff time on each eligible working date. Must be later than business_day_start on the same date.
target_time_zoneYesIANA zone in which the same deadline should also be returned for the receiving team.
include_start_dayYesTrue counts eligible time remaining on the start local date; false skips that entire local date and starts at the next working opening.
resolution_policyNoHow to resolve an ambiguous or nonexistent start wall time. reject is safest; earlier/later select a repeated instant; shift_forward moves a gap time by the DST jump.reject
business_day_startYesLocal opening time on each eligible working date. Must be earlier than business_day_end; overnight windows are not supported.
start_local_datetimeYesStart wall-clock date and time without an offset. start_time_zone supplies its IANA zone.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
linksNo
resultYes
requestYes
sourcesNo
successYes
versionNo
freshnessNo
timestampYes
next_actionsNo
service_versionYesDeployed Calcgrid implementation version used for the result.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.4/5.0
Behavior5/5

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

The description discloses the exact computation semantics: business hours are consumed only inside [business_day_start, business_day_end) on dates with is_working_day=true, with versioned calendars, pinned tzdb, DST resolution policy, and an audit trail. It adds reproducible holiday/DST evidence and full output composition beyond the annotations' read-only/idempotent hints. No contradiction with 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 long but front-loaded with the primary use case and exclusions, then moves into computation, examples, inputs, outputs, formula, and fallback in a logical order. The Chinese example and full JSON examples are somewhat redundant with the schema examples, but they justify their place for a complex multi-zone calendar tool. Minor redundancy keeps it from a 5.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 9-parameter cross-border calendar tool, the description covers when to use it, what it computes, how the formula behaves, what it returns, even the direct REST fallback and documentation link. An output schema exists for return fields, so the description does not need to enumerate them. Nothing required to invoke or judge this tool correctly is missing.

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 100%, and the schema already describes each parameter's role, format, and enum, so the baseline is 3. The description lists the parameters and provides two complete JSON examples but does not add meaning beyond the schema for individual parameters. The examples do illustrate realistic combinations, so it earns the baseline rather than less.

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 first sentence opens with a specific use case (SLA/support/procurement/order deadlines in business hours under China/UK calendars) and a concrete obligation to call the tool rather than compute from memory, which makes the operation unmistakable. It names the resource categories and the cross-time-zone output requirement, and the later 'What it computes' paragraph pins it down further. This clearly distinguishes it from day-counting siblings like add_china_working_days or check_china_working_day.

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?

The description gives explicit positive conditions ('Use this when...') and a long list of explicit exclusions ('Do not use this when you need calendar hours, overnight or split shift...'), which is strong routing guidance. It does not name sibling tools as alternatives, but the exclusions plus the examples are enough for an agent to decide. This is clear context with no misleading advice.

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