Skip to main content
Glama

curatedapi

Working hours and SLA deadline calculator

calc_date_working_hours
Read-only

The deadline a number of working hours after a start, or the working time between two moments, with office hours, weekends, public holidays and time zones.

Answers the two questions a service-level agreement asks. When is the deadline, if a ticket opened now must be answered within 8 working hours? And how much working time passed between the moment it opened and the moment it closed? Working time is the office hours you give, in the office's time zone, on days that are not a weekend day, a public holiday of the chosen calendar or one of your own closing days. Time outside office hours does not count: a ticket opened on Friday evening starts its clock on Monday morning.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "start": "<start>",
      "timezone": "<timezone>"
    },
    "name": "calc_date_working_hours"
  }
}

Input Schema

NameRequiredDescriptionDefault
endNoWhen the clock stops, to measure the working time.
startYesWhen the clock starts: a date-time with a UTC offset, or a local time in timezone.
day_endNoWhen work ends each day, as HH:MM; 24:00 for midnight. At most 5 characters.17:00
optionsNoPrecision and rounding of the results (default: rounding=half_even, decimals=4).
weekendNoDays of the week that are not worked. Options: sat_sun: Saturday and Sunday; fri_sat: Friday and Saturday; sun: Sunday only; fri: Friday only; none: no weekend dayssat_sun
calendarNoThe public holidays to leave out (2020 to 2030). Omit it to count only weekends and extra_holidays. Options: US: United States (federal holidays); GB-ENG: United Kingdom: England and Wales; GB-SCT: United Kingdom: Scotland; GB-NIR: United Kingdom: Northern Ireland; DE: Germany (the nine nationwide holidays); DE-BW: Germany: Baden-Württemberg; DE-BY: Germany: Bavaria; DE-BE: Germany: Berlin; DE-BB: Germany: Brandenburg; DE-HB: Germany: Bremen; DE-HH: Germany: Hamburg; DE-HE: Germany: Hesse; DE-MV: Germany: Mecklenburg-Vorpommern; DE-NI: Germany: Lower Saxony; DE-NW: Germany: North Rhine-Westphalia; DE-RP: Germany: Rhineland-Palatinate; DE-SL: Germany: Saarland; DE-SN: Germany: Saxony; DE-ST: Germany: Saxony-Anhalt; DE-SH: Germany: Schleswig-Holstein; DE-TH: Germany: Thuringia; FR: France (mainland); NL: Netherlands; IE: Ireland; BE: Belgium; AT: Austria; IT: Italy
timezoneYesThe IANA time zone the office hours are in.
add_hoursNoWorking hours allowed, to find the deadline. Allowed: >= 0 and <= 20000. Unit: hours.
day_startNoWhen work starts each day, as HH:MM. At most 5 characters.09:00
extra_holidaysNoMore days that are not worked, such as company closing days. Up to 1000 items.

Output Schema

NameRequiredDescriptionDefault
inputsYesThe inputs as understood.
resultYes
formulaNo
receiptNoOnly with ?receipt=true: a signed receipt for this answer, a JSON Web Token signed with Ed25519 (alg EdDSA). Its claims are iss, iat, jti (the request id), endpoint, date and response (this response without the receipt). Check it with the keys at /.well-known/jwks.json or POST /v1/receipts/verify.
warningsYes
exactnessYesFor each decimal output: exact; rounded (correctly, to the precision); rounded_uncertified (the last digit could not be proven); or underflow (below 1e-100, reported as 0).
precisionNoThe precision and rounding that were applied.
calculatorYesThe calculator and version that ran.
referencesNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.1/5.0
Behavior3/5

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

Annotations already establish readOnly, non-destructive, closed-world behavior, and the description adds real semantic content about the counting model ('time outside office hours does not count', 'Friday evening starts its clock on Monday morning'). It does not flag that holiday calendars are only populated for 2020-2030, a behavioral limit an agent would want to know when choosing a calendar.

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 core statement is front-loaded in the first sentence with the rule details following in logical order. The two rhetorical questions earn their space by grounding the abstraction, though the prose runs slightly long for a definition.

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?

With an output schema present and full parameter descriptions, the definition only needs to supply the computational model, which it does. The remaining gap is the undocumented calendar year range and the unstated condition that selects deadline mode versus duration mode.

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, and the description earns more by explaining the conceptual model behind day_start/day_end, weekend, calendar and extra_holidays as a unified definition of 'working time'. It still leaves the exact mode switch (supply end vs. add_hours) implicit rather than stating it as a rule.

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 names both operating modes precisely: 'the deadline a number of working hours after a start' and 'the working time between two moments', qualified by office hours, weekends, holidays and time zones. That scope distinguishes it from plain date-add or date-difference siblings without needing their schemas.

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 usage contexts (SLA response deadline, elapsed working time on a closed ticket) that make the when-to-use obvious. It stops short of naming exclusions, e.g. telling the agent to use simple date arithmetic when office-hours rules are irrelevant.

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