Skip to main content
Glama

get_system_timezone

Retrieve the current system timezone to ensure accurate date and time information, addressing timezone confusion in AI responses.

Instructions

Get the system's current timezone

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Executes the 'get_system_timezone' tool by retrieving the system timezone using TimeService and augmenting with current time information in that timezone, returning structured JSON response.
    case 'get_system_timezone': { const systemTimezone = TimeService.getSystemTimezone(); const currentTime = TimeService.getCurrentTime(systemTimezone, 'full'); return { content: [ { type: 'text', text: JSON.stringify({ systemTimezone, currentTime: currentTime.localizedFormat, utcOffset: currentTime.utcOffset, isDST: currentTime.isDST, }, null, 2), }, ], }; }
  • src/index.ts:72-79 (registration)
    Registers the 'get_system_timezone' tool in the tools list for ListToolsRequest, including its schema (no input params).
    { name: 'get_system_timezone', description: 'Get the system\'s current timezone', inputSchema: { type: 'object', properties: {}, }, },
  • Helper method that implements the core logic to retrieve the system's current IANA timezone identifier.
    static getSystemTimezone(): string { return Intl.DateTimeFormat().resolvedOptions().timeZone; }

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/davidan90/time-node-mcp'

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