Skip to main content
Glama

getDateByTimestamp

Convert timestamps to readable date formats for data analysis and system integration tasks.

Instructions

Convert the provided timestamp to date format

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
tsYes

Implementation Reference

  • index.ts:32-34 (handler)
    Handler that executes the tool by calling getDateByTimestamp on the input ts and returning it as a string.
    execute: async (args) => {
        return String(getDateByTimestamp(args.ts));
    },
  • Input schema defining the 'ts' parameter as a number.
    parameters: z.object({
        ts: z.number(),
    }),
  • index.ts:26-35 (registration)
    Registration of the 'getDateByTimestamp' tool with FastMCP server.
    server.addTool({
        name: "getDateByTimestamp",
        description: "Convert the provided timestamp to date format",
        parameters: z.object({
            ts: z.number(),
        }),
        execute: async (args) => {
            return String(getDateByTimestamp(args.ts));
        },
    });
  • Helper function implementing the core logic: converts timestamp to localized date string.
    function getDateByTimestamp(ts: number) {
        return new Date(ts).toLocaleString()
    }
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states the tool converts a timestamp to date format, implying a read-only transformation, but doesn't specify details like timezone handling, output format (e.g., ISO 8601, human-readable), error behavior for invalid inputs, or performance characteristics. This leaves significant gaps in understanding how the tool behaves beyond its basic function.

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?

The description is extremely concise—a single sentence that directly states the tool's function without unnecessary words. It's front-loaded with the core purpose, making it efficient and easy to parse. Every part of the sentence earns its place by conveying essential information.

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

Completeness2/5

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

Given the tool's simplicity (1 parameter, no annotations, no output schema), the description is incomplete. It doesn't explain the output (e.g., what date format is returned), error handling, or how it differs from siblings. For a conversion tool, details like timezone or format are critical for effective use, making this description inadequate despite the low complexity.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has 1 parameter with 0% description coverage, meaning the parameter 'ts' is undocumented in the schema. The description adds minimal semantics by implying 'ts' is a timestamp to convert, but doesn't specify units (e.g., seconds, milliseconds), range, or format expectations. This insufficiently compensates for the low schema coverage, leaving the parameter poorly defined.

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 clearly states the tool's purpose: converting a timestamp to date format. It specifies the verb 'convert' and the resource 'timestamp', making it easy to understand what the tool does. However, it doesn't differentiate from sibling tools like 'batchGetDateByTimestamp' or 'cal', which might offer similar or related functionality.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention sibling tools like 'batchGetDateByTimestamp' for batch processing, 'cal' for calendar-related operations, or 'getNow' for current time. There's no context on prerequisites, limitations, or appropriate scenarios for use.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/pwh-pwh/cal-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server