Skip to main content
Glama

date_interval

The distance between two dates. 'days' is the exact signed count (negative when end precedes start) and is always reliable. 'calendar' breaks the same distance into whole years, then whole months, then days, using the clamp policy, so adding that breakdown back to the start date with add_to_date returns the end date exactly. Give start_time and end_time and the answer also carries 'ticks', the signed distance in the calendar's finest unit of the day, and 'time', that distance as whole days plus a count per unit. Give both or neither: one alone is refused rather than measured from the start of the other day, which would be a moment you did not give — pass 0 if that is what you mean. Exact integer arithmetic; never estimates.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
endYes
startYes
calendarYes
end_timeNo
start_timeNo

TDQS

A4.5/5.0
Behavior5/5

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

With no annotations present, the description carries the full disclosure burden, and it delivers: signed distances, negative counts when end precedes start, the clamp policy, refusal when only one time parameter is supplied, a note that 0 can be passed intentionally, and a guarantee of exact integer arithmetic. Said behavior goes well beyond basic tool documentation and prevents common misinferences.

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

Conciseness4/5

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

The description is dense but appropriately so, since there is no output schema and no annotations to lean on. It is front-loaded with the core definition and then systematically adds edge cases, return-field semantics, and the exactness guarantee. The middle long sentence bundling 'ticks', 'time', and the pair rule is somewhat harder to parse, so it loses one point for structure.

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?

For a tool with five parameters, zero schema coverage, and no output schema, the description covers the essential operational surface: input semantics, time-pair constraints, output fields, edge-case behavior, and the relationship to add_to_date. Its main remaining weakness is that the concrete structure of the 'calendar', 'start', and 'end' objects is not spelled out, leaving some ambiguity for an agent constructing arguments from scratch.

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?

The schema provides no textual documentation for the parameters—only empty objects and null defaults—so the description must compensate. It supplies meaning for start and end as dates, explains start_time and end_time semantics including the 'pass 0' rule, and connects the calendar parameter to the breakdown policy and clamp behavior. It does not fully specify the internal shape of the calendar or date objects, which is a gap, but the semantic guidance is strong.

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 precise definition—the distance between two dates—and then explicitly separates the two meanings: exact signed 'days' versus a 'calendar' breakdown of years, months, and days. This level of specificity, plus naming add_to_date as the inverse operation, makes the tool's role unmistakable among many calendar sibling tools.

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

Usage Guidelines4/5

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

The description sets clear context: use this tool when you need the exact distance between two dates, with integer arithmetic and a calendar-aware breakdown. It also gives operational rules such as 'Give both or neither: one alone is refused' and points to add_to_date for the inverse direction. It does not, however, enumerate explicit exclusion scenarios versus each alternative sibling, so it stops short of a perfect routing guide.

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.

TDQS

A3.9/5.0
Disambiguation4/5

Each tool targets a distinct calendar operation, and the descriptions carefully draw boundaries between related concepts. There is modest overlap: convert_date also reports a named period, and calendar_events can answer nth-weekday questions that overlap with nth_weekday_of_month, so an agent might occasionally pick the wrong entry point.

Naming Consistency3/5

All names are readable and consistently snake_case, but the set mixes verb-led names like convert_date and render_timeline with noun-led names like calendar_events and moon_phases, plus one prepositional verb in add_to_date. This is a readable mixture rather than a uniform verb_noun pattern.

Tool Count5/5

Fifteen tools sits at the upper end of the typical well-scoped range, but every tool fills a distinct role for an almanac-style server: date math, conversion, calendar queries, formatting, parsing, rendering, lunar and solar calculations, generation, and validation. The batched plural parameters also make the count feel intentional rather than bloated.

Completeness4/5

The surface covers the domain unusually well: conversion, arithmetic, events, periods, weekdays, format/parse, SVG rendering, moon phases, daylight, scattering, and validation all have dedicated tools. The main gap is introspection—there is no direct way to list a calendar spec's months, eras, week structure, periods, or formats beyond what other tools reveal through errors and outputs.

Resources