Skip to main content
Glama

x402 Toolbox

Duration between two dates/times, calendar difference and business days

time_diff
Read-onlyIdempotent

Duration between two dates/times, calendar difference and business days. Exact duration (seconds, minutes, hours, days), calendar difference in years/months/days, and the number of weekdays (Mon-Fri) between two dates, evaluated in a chosen time zone. Optionally adds a duration to a date. Price: $0.003 USDC per call via x402 (eip155:8453).

Input Schema

NameRequiredDescriptionDefault
tzNoUTC
endNonow
startYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

B3.3/5.0
Behavior4/5

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

The annotations already declare readOnlyHint, idempotentHint, non-destructive and openWorld=false, so the safety profile is covered. The description adds genuinely new behavioral context: results are evaluated in a caller-chosen time zone and each call costs $0.003 USDC via x402 on eip155:8453, which matters for invocation decisions. It does not disclose return shape or rounding conventions.

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

Conciseness3/5

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

The opening sentence is nearly verbatim the tool title, so the first clause spends space restating structured data. The remaining content – output categories, time zone, price – is efficient, but the pricing note sits at the end where it is easy to lose.

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

Completeness3/5

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

With no output schema, the description does a fair job enumerating what is returned (seconds/minutes/hours/days, years/months/days, weekday count). However, for a date-math tool with three undocumented string parameters it omits input formats and defaults, and it advertises a duration-addition mode the schema cannot express.

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%, so the description carries the full burden, yet it never states accepted date formats for start/end, never mentions that end defaults to 'now', and never explains the tz default of UTC. Only the time-zone concept is loosely conveyed. The claimed 'add a duration' capability has no corresponding parameter at all, leaving a gap an agent cannot resolve from the schema.

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 names a concrete operation (duration between two dates/times) and enumerates the outputs it computes: exact duration, calendar difference, and weekday count. That is enough to separate it from siblings such as time_convert or cron_next, though it never names those alternatives. The trailing claim that it 'optionally adds a duration to a date' muddies the scope, since the input schema exposes no duration operand.

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 feature list – an agent can infer this is the tool for elapsed-time or business-day questions – but there is no statement of when to prefer it over time_convert, nor any exclusion or prerequisite. The agent must reason from siblings' names alone.

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.