Skip to main content
Glama

get_current_time

Retrieve the current time in a specified timezone for accurate timestamping in Algorand blockchain transactions and operations.

Instructions

Get the current time in a specified timezone

Input Schema

NameRequiredDescriptionDefault
timezoneNoTimezone identifier (e.g., "UTC", "America/New_York")

Input Schema (JSON Schema)

{ "properties": { "timezone": { "description": "Timezone identifier (e.g., \"UTC\", \"America/New_York\")", "type": "string" } }, "required": [], "type": "object" }

Implementation Reference

  • Executes the get_current_time tool: parses input arguments, retrieves current time in specified timezone (default UTC), formats it, and returns as text response or error if invalid timezone.
    case 'get_current_time': { const parsed = GetTimeArgsSchema.parse(args); const timezone = parsed.timezone || 'UTC'; try { const now = new Date(); const timeString = now.toLocaleString('en-US', { timeZone: timezone, weekday: 'long', year: 'numeric', month: 'long', day: 'numeric', hour: '2-digit', minute: '2-digit', second: '2-digit', timeZoneName: 'short', }); return { content: [ { type: 'text', text: `Current time in ${timezone}: ${timeString}`, }, ], }; } catch (error) { return { content: [ { type: 'text', text: `Error: Invalid timezone "${timezone}" - ${error}`, }, ], isError: true, }; } }
  • src/index.ts:128-141 (registration)
    Registers the get_current_time tool in the TOOLS array with name, description, and inputSchema definition.
    { name: 'get_current_time', description: 'Get the current time in a specified timezone', inputSchema: { type: 'object', properties: { timezone: { type: 'string', description: 'Timezone identifier (e.g., "UTC", "America/New_York")', }, }, required: [], }, },
  • Zod schema for validating input arguments of the get_current_time tool (optional timezone string).
    const GetTimeArgsSchema = z.object({ timezone: z.string().optional(), });

Other Tools

Related 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/Jake-loranger/algorand-mcp-server'

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