Skip to main content
Glama

time_relative

Read-only

Relative time humanizer — Turn timestamps into human relative times like '3 hours ago', 'yesterday' or 'in 2 weeks' using Intl.RelativeTimeFormat in any locale, plus the exact calendar-aware breakdown (years, months, days, hours, minutes, seconds), exact_text ('6 hours, 30 minutes ago'), compact form (-6h 30m), delta seconds, direction, and calendar-day difference/label (today, yesterday, tomorrow) in a chosen time zone. Params: ts= one or more ISO 8601 dates or unix seconds/ms, comma-separated (max 50); now= reference time (default current time); tz= IANA zone for calendar days (default UTC); locale= (default en); locales= extra comma list for side-by-side translations; style=long|short|narrow; numeric=auto|always. Offline. Price: $0.001 USDC (Base, via x402).

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "ts": "<ts>"
    },
    "name": "time_relative"
  }
}

Input Schema

NameRequiredDescriptionDefault
tsYes2026-11-24T10:00:00Z,2026-12-25

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A3.8/5.0
Behavior4/5

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

Beyond the readOnly/destructive annotations, the description discloses defaults (now=current time, tz=UTC, locale=en), an input cap (max 50 timestamps), and a per-call price of $0.001 USDC via x402 — cost and limits an agent genuinely needs. It also self-describes as 'Offline', which sits in mild tension with openWorldHint=true (a paid x402 call is not truly offline), though that reads as imprecise wording rather than a direct contradiction of the declared safety profile.

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?

It is a single dense paragraph but front-loaded with the core purpose, then output forms, then parameters, then cost — a sensible order with no filler sentences. It is information-dense rather than padded, though the run-on feature list could be split for faster scanning.

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?

With no output schema, the description carries the return-value burden and does so well: it names the relative string, exact_text, compact form, delta seconds, direction, and calendar-day difference/label. Combined with input limits, defaults and pricing, the only shortfall is that the advertised parameters are not actually callable per the schema.

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?

The description goes far beyond the schema, which documents only `ts` with a bare example: it enumerates now, tz, locale, locales, style and numeric with defaults and accepted value sets (long|short|narrow, auto|always). The one caveat is that those extra parameters are absent from the input schema, so an agent may attempt arguments the schema will reject — a real usability risk despite the added meaning.

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 verb and resource: 'Turn timestamps into human relative times' with named output forms ('3 hours ago', 'yesterday', 'in 2 weeks') and Intl.RelativeTimeFormat under the hood. That is precise enough for an agent to know exactly what it does, but it never distinguishes itself from close siblings such as time_age or time_date_parse, so an agent choosing between them still has to guess.

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 — you would reach for this when you want human-readable relative phrasing plus a calendar-aware breakdown — but there is no explicit when-to-use, when-not-to-use, or named alternative. Nothing tells the agent, for example, whether to prefer this over time_age for a simple age calculation.

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.

Resources