getNow
Retrieve the current timestamp for time-sensitive calculations or data logging in mathematical expressions.
Instructions
Get the current timestamp
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- index.ts:55-64 (registration)Registration of the "getNow" tool, including schema and inline execute handler.
server.addTool({ name: "getNow", description: "Get the current timestamp", parameters: z.object({ }), execute: async (args) => { return String(getNow()); }, }); - index.ts:58-60 (schema)Input schema for "getNow" tool: empty object (no parameters).
parameters: z.object({ }), - index.ts:61-63 (handler)Handler (execute function) for "getNow" tool: calls getNow() and returns as string.
execute: async (args) => { return String(getNow()); }, - index.ts:79-81 (helper)Core implementation of getNow(): returns current timestamp via Date.now().
function getNow() { return Date.now(); }