Skip to main content
Glama

get_unixtime

Convert the current date and time into Unix timestamp format for precise time tracking and calculations in applications.

Instructions

Get unixtime (e.g. 1746627290)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handler function for the 'get_unixtime' tool. It computes the current Unix timestamp using dayjs().unix() and returns it as a text content block. This also serves as the registration since the handler is defined inline.
    server.tool("get_unixtime", "Get unixtime (e.g. 1746627290)", async () => { const unixTimestamp = dayjs().unix(); return { content: [ { type: "text", text: String(unixTimestamp), }, ], }; });
  • src/index.ts:35-45 (registration)
    Registration of the 'get_unixtime' tool using server.tool(), with description and inline handler.
    server.tool("get_unixtime", "Get unixtime (e.g. 1746627290)", async () => { const unixTimestamp = dayjs().unix(); return { content: [ { type: "text", text: String(unixTimestamp), }, ], }; });

Other Tools

Related 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/t-shiratori/time-tools-mcp-server'

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