Skip to main content
Glama
0brym

Modular MCP Server

by 0brym

timestamp

Retrieve current timestamps in ISO, Unix, or human-readable formats for time-sensitive operations and data synchronization.

Instructions

Get current timestamp

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
formatNoFormat: "iso" (default), "unix", or "human"

Implementation Reference

  • The execute handler for the 'timestamp' tool, which generates the current timestamp in the requested format: 'unix' (seconds since epoch), 'human' (locale string), or 'iso' (ISO string, default).
    async execute(args) { const { format = 'iso' } = args; const now = new Date(); switch (format) { case 'unix': return { timestamp: Math.floor(now.getTime() / 1000) }; case 'human': return { timestamp: now.toLocaleString() }; case 'iso': default: return { timestamp: now.toISOString() }; } }
  • Input schema for the 'timestamp' tool defining the optional 'format' parameter.
    inputSchema: { type: 'object', properties: { format: { type: 'string', description: 'Format: "iso" (default), "unix", or "human"' } } },
  • plugins/utils.js:58-83 (registration)
    The 'timestamp' tool definition within the utils plugin's tools object, which serves as its registration point for the plugin manager.
    timestamp: { description: 'Get current timestamp', inputSchema: { type: 'object', properties: { format: { type: 'string', description: 'Format: "iso" (default), "unix", or "human"' } } }, async execute(args) { const { format = 'iso' } = args; const now = new Date(); switch (format) { case 'unix': return { timestamp: Math.floor(now.getTime() / 1000) }; case 'human': return { timestamp: now.toLocaleString() }; case 'iso': default: return { timestamp: now.toISOString() }; } } },
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/0brym/mcp'

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