Skip to main content
Glama

date_diff

Exact difference between two dates or timestamps in years, months, days, hours and total seconds. 0.001 USDC per call via x402.

Input Schema

NameRequiredDescriptionDefault
toNoEnd date or timestamp, default now
fromYesStart date or timestamp
paymentProofNoPayment proof: USDC tx hash on Polygon or Base (0x...) or Solana tx signature. Omit on the first call to receive the 402 payment instructions, pay, then call again with the proof.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

B3.2/5.0
Behavior3/5

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

With no annotations the description carries the full burden, and it does disclose a meaningful behavioral trait: a per-call charge of 0.001 USDC via x402, which an agent needs for cost-aware selection. However, it omits the actual 402 handshake behavior (first call returns payment instructions) and says nothing about side effects, though a date-difference computation is implicitly a pure read.

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?

Two tight sentences with the core capability front-loaded and the cost stated immediately after. The payment sentence partially duplicates the paymentProof field description, but it is short enough that the redundancy costs little.

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?

There is no output schema, and the description compensates by specifying the returned units (years, months, days, hours, total seconds). Combined with full parameter coverage this is nearly complete; only accepted input date formats and sign/ordering behavior are left to inference.

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%, with both 'from' and 'to' documented including the 'default now' behavior for 'to', so the schema does the heavy lifting. The description adds nothing beyond it—no accepted format examples (ISO 8601, epoch, timezone suffix) or negative-difference semantics—so the baseline 3 applies.

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 computation (exact difference between two dates/timestamps) and enumerates the output units, so an agent knows precisely what it gets. It is distinguishable from conversion siblings like timestamp_convert or timezone_convert by the word 'difference', but never names or rules out those alternatives explicitly.

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 statement of when to use this versus timezone_convert, business_days, or timestamp_convert, nor any prerequisites about accepted date formats. The only contextual guidance is the pricing line, which tells the agent about cost but not about tool selection.

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.