Skip to main content
Glama

Tiempo relativo en palabras

date-relative
Read-onlyIdempotent

Describe el tiempo entre dos instantes como frase localizada ("en 3 días", "hace 2 horas"). Cuándo: un resultado de fechas, zonas horarias o calendario tiene que ser exacto (desfases, horario de verano, fines de mes, bisiestos). No para: formatear una fecha/hora en una zona e idioma con estilos Intl o un patrón (datetime-format). Efectos secundarios: ninguno (solo lectura, sin red, sin estado guardado). Determinista: la misma entrada da la misma salida. Límites: entrada JSON de hasta 64 KB, 1 s por llamada, resultado de hasta 1 MB.

EN: Describes the time between an instant and a reference instant as a localized phrase via Intl.RelativeTimeFormat ("in 3 days", "hace 2 horas"), choosing the largest sensible unit. When: a date, time-zone or calendar result has to be exact (offsets, daylight saving, month ends, leap years). Not for: formatting an instant in a time zone and locale, either with Intl styles (datetime-format). [EN completo / full EN: inputSchema.description]

Input Schema

NameRequiredDescriptionDefault
localeNoBCP 47 locale (string; optional; default "en"; up to 35 chars; pattern ^[A-Za-z]{2,3}(-[A-Za-z0-9]{2,8})*$).en
numericNoauto allows "yesterday"/"ayer" (optional; one of: always, auto; default "always").always
datetimeYesTarget instant (string; required; up to 40 chars).
referenceYesReference instant ("now") (string; required; up to 40 chars).

Output Schema

NameRequiredDescriptionDefault
unitNo
valueNoany JSON value
phraseNo
secondsNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • addedInput schema / properties / datetime / examples
      Added value: +[
      +  "2026-11-03T12:00:00Z"
      +]
    • addedInput schema / properties / reference / examples
      Added value: +[
      +  "2026-10-31T12:00:00Z"
      +]
  2. Changed1 schema field changed
    • addedInput schema / description
      Added value: +"EN: Describes the time between an instant and a reference instant as a localized phrase via Intl.RelativeTimeFormat (\"in 3 days\", \"hace 2 horas\"), choosing the largest sensible unit. When: a date, time-zone or calendar result has to be exact (offsets, daylight saving, month ends, leap years). Not for: formatting an instant in a time zone and locale, either with Intl styles (datetime-format). Side effects: none (read-only, no network access, no stored state). Deterministic: the same input gives the same output. Limits: JSON input up to 64 KB, 1 s per call, result up to 1 MB."
  3. First observed

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, openWorldHint=false, idempotentHint and destructiveHint=false, so restating "sin red, sin estado guardado, determinista" earns little credit. The description does add genuine new behavior: concrete limits (64 KB input, 1 s per call, 1 MB result) and the largest-sensible-unit selection rule, which annotations cannot convey.

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?

Front-loaded with the core action and cleanly separated by labeled clauses (Cuándo / No para / Efectos / Límites), so an agent can skim it. It loses a point for the ES/EN duplication plus a meta-pointer to inputSchema.description, which adds length without adding information.

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

Completeness5/5

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

The tool has an output schema and full param coverage, and the description still covers purpose, selection conditions, the excluded alternative, side effects, determinism and resource limits. Nothing an agent needs to call it correctly is missing.

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%, so locale, numeric, datetime and reference are already fully documented in the schema, including the numeric enum and defaults. The description only adds that the output is a localized phrase whose unit is auto-chosen; it does not clarify reference-vs-now semantics or accepted datetime formats beyond the schema examples. Baseline 3 applies.

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?

Names a precise verb+resource: describes the time between two instants as a localized phrase via Intl.RelativeTimeFormat, and states the unit-selection rule ("choosing the largest sensible unit"). It explicitly distinguishes itself from the nearest sibling (datetime-format), so an agent can pick between them without opening either schema.

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

Usage Guidelines5/5

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

Has an explicit "Cuándo/When" clause scoped to exactness-sensitive date, time-zone and calendar results (offsets, DST, month ends, leap years) and an explicit "No para/Not for" clause pointing at datetime-format for Intl styles and patterns. Both the positive condition and the exclusion are stated.

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