Skip to main content
Glama

TeamPredict HR Calculators

Time duration between two date-times

time_duration_between
Read-onlyIdempotent

Work out how much time passes between a start and an end date and time, in days, hours and minutes, accounting for daylight saving changes in the chosen US time zone. Use it for shift lengths that cross midnight, elapsed time on a ticket, on-call windows and billing time. Use days_between_dates for whole calendar days, add_time_to_datetime to move a date-time forward or back by a known amount, and military_shift_hours for a shift written in 24-hour times only.

Input Schema

NameRequiredDescriptionDefault
end_dateYesThe end date as a calendar date in the form YYYY-MM-DD, for example 2026-11-02.
end_timeYesThe end time as a 24-hour clock time in the form HH:MM, for example 22:30.
time_zoneNoThe time zone the clock times are read in, so a span across a daylight saving change counts the hour that really passes. Use 'none' for plain 24-hour days with no zone. Default America/New_York.America/New_York
start_dateYesThe start date as a calendar date in the form YYYY-MM-DD, for example 2026-11-02.
start_timeYesThe start time as a 24-hour clock time in the form HH:MM, for example 22:30.

Output Schema

NameRequiredDescriptionDefault
inputsYesThe inputs as used, with defaults filled in.
resultsYesThe computed numbers. Unavailable numbers are null.
summaryYesOne or two plain sentences with the headline numbers.
calculator_urlYesThe TeamPredict calculator page that shows the same calculation, where a person can change the inputs.

Schema Changelog

Changes observed during successful MCP inspections.

  1. 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=false, so the safety profile is covered. The description adds genuine non-schema behavior: that daylight saving transitions are accounted for so the real elapsed hour is counted, and that output granularity is days/hours/minutes rather than a raw timestamp. It does not mention limits on span size or handling of an end before start, which keeps it short of a 5.

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?

Three sentences, each earning its place: purpose first, then use cases, then sibling routing. No filler and the core definition is front-loaded ahead of the disambiguation.

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?

With an output schema present, return-value detail is unnecessary, and annotations cover the safety profile while the schema fully documents all five parameters. The description supplies the remaining DST and granularity context an agent needs to call this correctly.

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 description coverage is 100%, including the format patterns and an explicit explanation of the time_zone enum and the 'none' option, so the schema already does the heavy lifting and the baseline is 3. The description adds only that the times are read in a US zone with DST adjustment, which largely restates the time_zone schema text; it says nothing extra about how start_date/start_time pair together.

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 opens with a specific verb-plus-resource statement: it computes elapsed time between a start and an end date-time, returned in days, hours and minutes, and it flags DST-awareness. An agent can distinguish it immediately from siblings like days_between_dates or add_time_to_datetime without opening any schema.

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 gives concrete scenarios (shift lengths crossing midnight, ticket elapsed time, on-call windows, billing) and then explicitly routes three named alternatives with the condition that selects each. This is the when-to-use / when-not-to-use pattern in full.

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