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
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/server.ts:101-106 (handler)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) }], }; }); - src/server.ts:71-78 (helper)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 }; }