Skip to main content
Glama

Date difference

ti_date_difference
Read-onlyIdempotent

Calculate the exact span between two dates in days or as Jalali years, months, and days—ideal for age calculations. Omit the end date to measure up to today.

Instructions

Count the days between two dates and give the span as Jalali years, months and days (age calculator).

Omit to_date for today. Both dates use calendar. If to_date is earlier, direction is "before".

Input Schema

NameRequiredDescriptionDefault
to_dateNoYYYY-MM-DD in `calendar`, e.g. 1405-08-10. Omit for today.
calendarNoCalendar of the date(s).jalali
from_dateYesStart date YYYY-MM-DD, e.g. birth date 1380-05-17.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.0

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent, non-destructive behavior, so the description only needs to add surface-specific facts; it does so by disclosing the returned fields (years/months/days span and a 'direction' value of "before") even though no output schema exists. It does not cover rounding or whether the span is normalized, but the key behavioral traits are exposed.

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 short sentences, front-loaded with purpose and followed by the default and the edge case; no filler or redundancy. Each sentence contributes a distinct fact the agent needs.

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 only three parameters at full schema coverage and annotations covering the safety profile, the description supplies the remaining essentials: default behavior, the direction field, and the calendar linkage across dates. The one open question, whether output is always Jalali even for gregorian/hijri input, is minor for a date-arithmetic tool.

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; the description goes beyond it by stating the cross-parameter constraint that both dates are interpreted in the chosen `calendar`, which the schema only hints at per-field. The to_date default restates the schema, so the added value is modest rather than exhaustive.

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 and resource ('Count the days between two dates') and states the output shape ('span as Jalali years, months and days'), which immediately separates it from ti_convert_date and ti_today in the sibling list. The 'age calculator' gloss removes any remaining ambiguity about what the tool is for.

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?

It gives concrete guidance for one parameter ('Omit to_date for today') and explains what happens in the reversed-date case, so usage is implied rather than spelled out. It never states when to prefer this over ti_convert_date or which calendar scenarios suit it, leaving the agent to infer the boundary.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.