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

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. Changed2 schema fields changed
    • addedInput schema / properties / end_time
      Added value: +{
      +  "anyOf": [
      +    {
      +      "additionalProperties": {
      +        "type": "integer"
      +      },
      +      "type": "object"
      +    },
      +    {
      +      "type": "integer"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "title": "End Time"
      +}
    • addedInput schema / properties / start_time
      Added value: +{
      +  "anyOf": [
      +    {
      +      "additionalProperties": {
      +        "type": "integer"
      +      },
      +      "type": "object"
      +    },
      +    {
      +      "type": "integer"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "title": "Start Time"
      +}
  2. First observed

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

A4.2/5.0
Disambiguation5/5

Each tool targets a distinct date/calendar operation: arithmetic, conversion, weekday lookup, period membership, moon phase, daylight, event queries, formatting/parsing, and two different rendering outputs. Even superficially similar tools (calendar_weekday vs nth_weekday_of_month, calendar_events vs calendar_periods) ask clearly different questions that the descriptions make unambiguous.

Naming Consistency4/5

Names are all lowercase snake_case and mostly follow a verb_first or noun_query pattern, but there is a mix: add_to_date, convert_date, and parse_calendar_date are imperative, while moon_phases, sun_daylight, and calendar_events are noun phrases describing what they return. The calendar_ prefix on three tools and consistent rendering parse/format pairs help readability, so this is a minor deviation, not chaos.

Tool Count5/5

15 tools sits at the upper bound of the ideal range for a focused domain toolkit. Every tool addresses a genuine calendar use case (define, convert, query, render, validate, generate), and none feels redundant or extraneous.

Completeness5/5

The set covers the full lifecycle of working with a custom calendar: validation before use, conversion between representations, date arithmetic and intervals, weekday and period queries, recurring events and daylight/moon data, formatting/parsing, and visual rendering. No obvious dead ends or missing operations come to mind for the stated domain.

Resources