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
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/index.ts:35-45 (handler)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), }, ], }; });