Skip to main content
Glama

Convert a unix timestamp

convert_unix_timestamp
Read-onlyIdempotent

Convert epoch seconds, milliseconds, microseconds, or nanoseconds to ISO-8601 and RFC 2822 in an IANA time zone, or convert a calendar time back to epoch.

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": "convert_unix_timestamp"
  }
}

Input Schema

NameRequiredDescriptionDefault
dayNo
hourNo
unitNoauto
yearNo
inputNoUnix timestamp, ISO-8601, RFC 2822, or now. Leave it empty when year, month, and day are set.
monthNo
minuteNo
secondNo
timeZoneNoIANA time zone, such as UTC or America/New_York.UTC

Output Schema

NameRequiredDescriptionDefault
unitYes
isoUtcYes
offsetYes
rfc2822Yes
secondsYes
weekdayYes
isoLocalYes
relativeYes
timeZoneYes
millisecondsYes
alternateIsoUtcYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / additionalProperties
      Added value: +false
  2. 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, idempotentHint, and openWorldHint=false, so the safety profile is covered. The description adds useful behavioral facts — multiple accepted input units and dual output formats — but says nothing about how 'auto' unit detection resolves ambiguity or how calendar fields take precedence over input. It does not contradict the annotations.

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?

A single dense sentence with no filler, front-loading the accepted units and output formats. It is a long compound sentence whose two modes could be split for faster scanning, which keeps it just below 5.

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 nine parameters but an output schema present, the description only needs to cover inputs and modes, and it covers units, time zones, and both conversion directions. The main residual gap is precedence between the free-form input and the calendar fields, which matters given nine optional parameters.

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 coverage is only 22% (input and timeZone are documented; the six calendar fields and unit are not). The description compensates for the most important gaps by naming the four epoch granularities and the IANA zone concept, and 'convert a calendar time back to epoch' hints that year/month/day/hour/minute/second are calendar components. It still leaves the interaction rules between input and the calendar fields, and the 'auto' default, unexplained.

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 (convert) and resource (unix timestamp) and enumerates exactly which epochs it accepts (s, ms, us, ns) plus the two output formats (ISO-8601, RFC 2822) and the reverse direction. It does not name a sibling such as date_difference to distinguish scope, so it falls short of a 5.

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 rather than stated: the agent can infer this tool is for timestamp/calendar format conversion, and the two modes (epoch→text, calendar→epoch) are spelled out. There is no explicit when-not guidance and no mention of how this differs from date_difference or convert_data_format.

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.