get_unixtime
Retrieve the current Unix timestamp for time-sensitive operations, data logging, or system synchronization.
Instructions
Get unixtime (e.g. 1746627290)
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/index.ts:35-45 (handler)Inline handler for the 'get_unixtime' tool. Computes the current Unix timestamp using dayjs().unix() and returns it as a text content block. This is also the registration point via server.tool.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 function.server.tool("get_unixtime", "Get unixtime (e.g. 1746627290)", async () => { const unixTimestamp = dayjs().unix(); return { content: [ { type: "text", text: String(unixTimestamp), }, ], }; });