Skip to main content
Glama

date_diff

Calculate precise time differences between two dates, returning results in years, months, days, hours, and minutes with total duration values.

Instructions

Calculate the difference between two dates/times. Returns the difference in years, months, days, hours, minutes and also total days/hours/minutes.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
startYesStart date in ISO 8601 format (e.g. 2024-01-15 or 2024-01-15T10:30:00)
endYesEnd date in ISO 8601 format
timezoneNoIANA timezone for parsing dates. Defaults to UTC.
Behavior4/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It clearly describes the return format ('difference in years, months, days, hours, minutes and also total days/hours/minutes'), which is valuable context beyond the input schema. However, it doesn't mention error handling, performance characteristics, or other behavioral traits.

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 perfectly concise with two sentences that directly explain the tool's function and return values. Every word earns its place, and the information is front-loaded with no unnecessary elaboration.

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 calculation tool with no annotations, 100% schema coverage, and no output schema, the description provides good context by explaining the return format. It could be more complete by mentioning error cases or edge behaviors, but it adequately covers the core functionality.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, providing complete parameter documentation. The description adds no additional parameter semantics beyond what's in the schema, so it meets the baseline of 3 for adequate but not enhanced parameter explanation.

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 clearly states the tool's purpose with specific verbs ('calculate the difference') and resources ('between two dates/times'), and distinguishes it from siblings by focusing on comprehensive date/time difference calculation rather than business days, time conversion, or other temporal operations.

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 description implies usage for calculating date/time differences but doesn't explicitly state when to use this tool versus alternatives like 'calculate_business_days' or 'calculate_time'. No exclusions or specific contexts are provided, leaving the agent to infer appropriate usage.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/aleck31/mcp-chrono'

If you have feedback or need assistance with the MCP directory API, please join our Discord server