Skip to main content
Glama
joshuaboys

datetime-mcp

by joshuaboys

datetime.health

Check the operational status and connectivity of the datetime-mcp server to verify its availability for retrieving timestamps and performing timezone-aware date calculations.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The registration and handler implementation for the 'datetime.health' tool. It calls 'healthPayload' and returns its result.
    server.tool("datetime.health", {}, async () => {
      const payload = healthPayload();
      return {
        content: [{ type: "text", text: JSON.stringify(payload, null, 2) }],
      };
    });
  • Helper function that generates the payload for the health check.
    function healthPayload() {
      // Monotonic time (won't jump backwards/forwards with NTP clock changes)
      const monotonicMs = Number(process.hrtime.bigint() / 1_000_000n);
      const wallEpochMs = Date.now();
      const processUptimeMs = Math.round(process.uptime() * 1000);
    
      return { wallEpochMs, monotonicMs, processUptimeMs };
    }
Install Server

Other 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/joshuaboys/datetime-mcp'

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