Skip to main content
Glama

time_difference

Calculate elapsed time between a start and end date/time in seconds, minutes, hours, days, weeks, and a human-readable string, with timezone support.

Instructions

Elapsed time between two date/times in seconds, minutes, hours, days, weeks and a human string.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
endNonow
startYes
timezoneNoUTC

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

C2.7/5.0
Behavior2/5

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

No annotations are provided, so the description carries the full behavioral burden and falls short. It discloses output units (useful), but says nothing about accepted input date formats, how timezone affects the result, DST boundaries, or what happens with a future start or past end.

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?

A single front-loaded sentence with no filler. It spends part of its length enumerating return units, which is arguably redundant given an output schema exists, but the sentence is efficient overall.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The output schema covers return values, so that need not be restated, but for a date-parsing tool the critical missing piece is the accepted input format and timezone semantics. With no annotations and 0% schema coverage, the definition is under-specified for correct invocation.

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

Parameters2/5

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

Schema description coverage is 0% for 3 parameters, so the description must compensate, and it does not. It never mentions the timezone parameter, the 'end' default of 'now', or the required string format for 'start' and 'end'.

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?

States a specific operation (elapsed time between two date/times) and enumerates the return units, which cleanly separates it from siblings like time_add and time_now. It does not explicitly name or contrast those siblings, but the purpose is unambiguous.

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

Usage Guidelines2/5

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

No guidance on when to pick this over time_add, time_convert, or time_now, and no mention of prerequisites or handling when only one endpoint is supplied. Usage is only inferable from the name and the phrase 'between two date/times'.

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