Skip to main content
Glama

Convert a Unix timestamp or date

convert_timestamp
Read-only

Convert a Unix timestamp or a date to Unix seconds, Unix milliseconds, ISO 8601 (UTC), an HTTP-style UTC string and a readable date in the chosen time zone. Numbers with 13 or more digits are read as milliseconds, shorter ones as seconds. Dates without a time zone are read as UTC. Errors are returned for unreadable dates and unknown time zones.

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": {
      "value": "<value>"
    },
    "name": "convert_timestamp"
  }
}

Input Schema

NameRequiredDescriptionDefault
valueYese.g. 1767225600 or 2026-10-27T09:30:00Z
timeZoneNoIANA time zone, e.g. Asia/KolkataUTC

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.5/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true, destructiveHint=false, and openWorldHint=false, so the safety profile is covered. The description adds genuinely useful behavior beyond that: the digit-length heuristic for unit detection, the UTC default for zone-less dates, the IANA requirement for the time zone, and that errors are returned for unreadable dates and unknown zones. It stops short of describing output shape or edge cases like out-of-range values.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Three tight sentences, each doing distinct work: outputs first, then input parsing rules, then error behavior. Nothing is repeated from the title or schema, and the most decision-relevant facts are front-loaded.

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?

With no output schema, the description takes on the burden of listing return formats, which it does comprehensively. Combined with input heuristics, time zone default, and error conditions, an agent has everything needed to call this correctly on the first attempt.

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 earns more by explaining what "value" actually accepts (either a numeric timestamp or a date string, with the digit-count rule deciding units) and by clarifying the UTC default behavior for timeZone. This is meaning the schema's examples do not convey.

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?

The description opens with a specific verb and resource ("Convert a Unix timestamp or a date") and enumerates the exact output representations produced (Unix seconds/ms, ISO 8601 UTC, HTTP-style UTC, readable local date). This is far more specific than the title alone and clearly distinguishes it from siblings like convert_units or format_json.

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

Usage Guidelines4/5

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

Implicit usage is made concrete by the parsing rules: it states that 13+ digit numbers are milliseconds and shorter ones are seconds, and that zone-less dates are treated as UTC, which tells an agent exactly which inputs are valid. It does not name alternatives or state when to prefer another tool, but for a standalone formatting utility the context is clear.

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.