Skip to main content
Glama

ClockCrest time tools

Difference between two dates

calculate_date_difference
Read-onlyIdempotent

Number of days between two calendar dates (end minus start), also as weeks + days and as years, months and days. Leap years are handled.

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>",
      "end": "<end>"
    },
    "name": "calculate_date_difference"
  }
}

Input Schema

NameRequiredDescriptionDefault
endYesSecond date, YYYY-MM-DD
startYesFirst date, YYYY-MM-DD

Output Schema

NameRequiredDescriptionDefault
endYesCalendar date, YYYY-MM-DD
daysYesend − start in days; negative when end is before start
notesYesCaveats and conventions that apply to this response.
startYesCalendar date, YYYY-MM-DD
weeksYes
sourceYesWhere the data or the algorithm comes from.
calendarYes
negativeYes
endWeekdayYesEnglish weekday name
startWeekdayYesEnglish weekday name

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?

The annotations already establish that this is a read-only, idempotent, non-destructive, closed-world calculation. The description adds meaningful behavioral detail by explaining that the result is expressed as days, weeks plus days, and years/months/days, and that leap years are handled. It does not contradict the annotations.

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?

The description is a single compact sentence with no wasted wording. The core operation is front-loaded, followed by output forms and leap-year handling.

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 simple two-parameter date calculation with full schema coverage, an output schema, and clear annotations, the description provides enough context. It covers the calculation semantics, output representations, and leap-year behavior without needing to restate schema or annotation details.

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 parameter formats and labels are already documented. The description adds semantic meaning beyond the schema by clarifying the subtraction direction: end minus start. This helps the agent interpret the sign or ordering of the result.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a specific operation: calculating the number of days between two calendar dates, with end minus start semantics. It also clarifies alternate output forms and leap-year handling. It is clear but does not explicitly distinguish itself from calculate_business_days, which is a relevant sibling.

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 mention of 'calendar dates' and leap years implies this is for calendar-day differences rather than business-day differences, but it does not explicitly say when to use calculate_business_days instead. Usage is reasonably implied but not directly specified.

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