Skip to main content
Glama

TeamPredict HR Calculators

Days between two dates

days_between_dates
Read-onlyIdempotent

Count the calendar days between two dates and break the gap into weeks, months and years, with the weekdays and weekend days inside it. Use it for 'how many days until X', tenure, age of a record, notice periods in calendar days and countdowns. Use business_days_between instead to leave out weekends and federal holidays, and time_duration_between when clock times matter. Valid for years 2000 to 2100.

Input Schema

NameRequiredDescriptionDefault
end_dateYesThe second date; if it is before start_date the two are swapped as a calendar date in the form YYYY-MM-DD, for example 2026-11-02.
start_dateYesThe first date as a calendar date in the form YYYY-MM-DD, for example 2026-11-02.
include_end_dateNoWhether the end date itself counts as a day, which adds one to the total. Default false.

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.1/5.0
Behavior3/5

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

Annotations already declare readOnly, idempotent, non-destructive and closed-world, so the safety profile is covered. The description adds the supported year range 2000–2100 and describes what the result breaks down into, which is useful. However, the swap-when-end-before-start behavior lives only in the schema, and no further runtime behavior (e.g., how partial weeks/months are rounded in the breakdown) is disclosed.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Three sentences, front-loaded with the core operation and with zero filler; the year-range constraint is tucked at the end but remains visible. The only weakness is that the routing sentence is dense and could be split, but no sentence is wasted.

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 and rich annotations, the description only needs to cover scope, alternatives, and constraints — and it does all three, including the 2000–2100 validity window that would otherwise be an undocumented failure mode. Nothing an agent needs in order to call this 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 description coverage is 100%, including the swap semantics for end_date and the include_end_date increment, so the schema carries the parameter burden. The description's only added semantic is the contrast between calendar days and business days, which is helpful framing but not parameter-level detail. Baseline 3 applies.

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?

States a specific verb and resource — count calendar days between two dates — and adds what the result contains (weeks/months/years breakdown plus weekday and weekend counts). This is immediately distinguishable from siblings like time_duration_between, which count clock time rather than calendar days.

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?

Gives concrete use cases ('how many days until X', tenure, age of a record, notice periods, countdowns) and then explicitly routes away: business_days_between for excluding weekends/holidays, time_duration_between when clock times matter. Both the when and the when-not are stated with named alternatives.

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