Skip to main content
Glama

getNow

Retrieve the current timestamp for time-sensitive calculations or data logging in mathematical expressions.

Instructions

Get the current timestamp

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

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()); }, });
  • 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()); },
  • Core implementation of getNow(): returns current timestamp via Date.now().
    function getNow() { return Date.now(); }

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