Skip to main content
Glama

Benchline

Difference between two dates

date_difference
Read-onlyIdempotent

Count calendar days, elapsed time, and business days between two dates. Business days skip weekends and any YYYY-MM-DD holidays you list.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
endDateYesEnd date as YYYY-MM-DD.
endTimeNoEnd time as HH:MM or HH:MM:SS. Defaults to midnight.
holidaysNoWeekday holidays to exclude from business days, one YYYY-MM-DD per line.
startDateYesStart date as YYYY-MM-DD.
startTimeNoStart time as HH:MM or HH:MM:SS. Defaults to midnight.
includeEndNoCount the end date as well as the days between.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
daysYes
signYes
hoursYes
weeksYes
yearsYes
monthsYes
minutesYes
secondsYes
extraDaysYes
totalDaysYes
totalHoursYes
countedDaysYes
holidayDaysYes
weekendDaysYes
businessDaysYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true, idempotentHint=true and openWorldHint=false, so safety is covered. The description adds genuine semantic behavior: business days exclude weekends and user-listed holidays, clarifying what the calculation actually does beyond the safety profile.

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?

Two sentences with zero filler, and the primary operation is front-loaded ahead of the business-day qualification. Every clause carries information.

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?

An output schema exists so return values need no explanation, and annotations carry the safety profile. The description is complete for calling the tool correctly; only minor edge-case semantics (e.g. includeEnd interaction) are left to the schema.

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%, so the schema already documents startDate, endDate, startTime, endTime, holidays and includeEnd with formats and defaults. The description restates the holidays format already present in the schema and adds nothing new, so the 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 (count) applied to a specific resource (calendar days, elapsed time, business days between two dates), and even enumerates the three distinct counting modes. There is no sibling tool doing date arithmetic, so no differentiation is needed and the purpose is fully self-evident.

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

Usage Guidelines3/5

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

The description implies when the business-day mode is useful ('skip weekends and any holidays you list') but gives no explicit when-to-use guidance or exclusion criteria. With no competing sibling for date math, implied usage is the realistic ceiling here.

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