Skip to main content
Glama
kinbinghua-lgtm

agent-core-mcp

date_calc

Read-onlyIdempotent

Calculate exact intervals between two ISO-8601 dates in days, weeks, months, years, hours, minutes, seconds, or business days. Uses UTC and true calendar arithmetic.

Instructions

Interval between two ISO-8601 dates in days, weeks, months, years, hours, minutes, seconds or businessDays (Mon-Fri). Months and years use true calendar arithmetic, not 30/365-day approximations. All math is UTC.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
toYesEnd date, same formats
fromYesStart date, e.g. 2026-01-15 or 2026-01-15T08:30:00Z
unitNoUnit for the result (default days)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.1

TDQS

A3.9/5.0
Behavior4/5

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

Annotations already establish the safe read-only, idempotent, non-destructive profile, so the bar is lower. The description still adds real behavioral context beyond them: true calendar arithmetic rather than 30/365 approximations, and UTC-only math, both of which materially affect results.

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 tight sentences, all earning their place, with the core operation front-loaded and the caveats (calendar arithmetic, UTC) following immediately. No filler or repetition of the tool name.

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?

No output schema exists, and the description is sufficient to call the tool correctly given the fully documented three-parameter schema. The one residual gap is whether the result is signed or absolute when 'to' precedes 'from', which the description never addresses.

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, but the description goes past bare restatement by defining businessDays as Mon-Fri and confirming calendar-accurate handling of the 'months' and 'years' enum values. It does not clarify sign/direction semantics for from vs to.

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 computation (interval between two ISO-8601 dates) and enumerates the units returned, so the resource and operation are unambiguous. It does not explicitly name the sibling date_add or draw the boundary against it, so an agent must infer the distinction from the semantics alone.

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?

Usage is implied by the phrasing 'interval between two ISO-8601 dates', which naturally contrasts with date_add's offset semantics. However, there is no explicit statement of when to prefer this tool over date_add, nor any prerequisites or exclusions, so guidance stops at implication.

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