Skip to main content
Glama

Relative Time Formatter

RelativeTimeFormatter
Read-only

Relative Time Formatter: Relative Time Formatter converts Unix timestamps and ISO dates into readable relative time phrases. Choose between short, long, or abbreviated styles to get humanized past or future strings, millisecond differences, and unit breakdowns from seconds to years. (Cost: 1 credit)

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "RelativeTimeFormatter"
  }
}

Input Schema

NameRequiredDescriptionDefault
dateNoISO date string
styleNoOutput styleshort
referenceNoReference time to compare against (default: current time)
timestampNoUnix timestamp in seconds or milliseconds

Output Schema

NameRequiredDescriptionDefault
dataNo
errorNoError message, null on success
statusNo"ok" on success

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.5/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true, destructiveHint=false and openWorldHint=true, so the safety profile is covered. The description adds the cost ('1 credit') and clarifies that output spans past or future phrasing plus millisecond differences and unit breakdowns, which is useful context. It could still note behavior for mutually exclusive inputs (date vs timestamp).

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 first clause redundantly repeats the tool name before restating it ('Relative Time Formatter: Relative Time Formatter converts...'), which is wasted space. The second sentence is dense and earns its place by covering styles, direction, and output components.

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 a full schema, annotations, and an output schema, the description only needs to orient the agent, which it does: input types, style options, and cost are all covered. The one gap is that it never explains the relationship between 'date' and 'timestamp' (apparently alternatives) or how 'reference' affects output, leaving that entirely to 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?

Schema coverage is 100%, so the baseline is 3, but the description genuinely adds meaning the schema lacks: the 'style' parameter's actual values (short, long, abbreviated) are enumerated in prose while the schema only says 'Output style' with default 'short' and no enum. It also signals the granularity of output (seconds to years), which informs style choice.

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 verb and resource: converts Unix timestamps and ISO dates into readable relative time phrases, including millisecond differences and unit breakdowns. That distinguishes it by nature from absolute-time siblings like UnixTimestampConverter, but no sibling is named explicitly, so an agent must infer the boundary.

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 output type ('humanized past or future strings'), so an agent can infer it is for relative phrasing rather than absolute conversion. There is no explicit when-to-use/when-not statement and no mention of the obvious alternative (UnixTimestampConverter) or when a reference time should be supplied.

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.