Skip to main content
Glama

get_timezone

Retrieve the timezone identifier (e.g., Asia/Tokyo) for accurate time-based operations using the Time Tools MCP Server.

Instructions

Get timezone (e.g. Asia/Tokyo)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handler for the 'get_timezone' tool. It calls the getTZ() helper to retrieve the current timezone (guessed by dayjs.tz.guess() if not provided) and returns it as text content.
    server.tool("get_timezone", "Get timezone (e.g. Asia/Tokyo)", async () => { return { content: [ { type: "text", text: getTZ(), }, ], }; });
  • src/index.ts:24-33 (registration)
    Registration of the 'get_timezone' tool on the McpServer instance using server.tool().
    server.tool("get_timezone", "Get timezone (e.g. Asia/Tokyo)", async () => { return { content: [ { type: "text", text: getTZ(), }, ], }; });
  • Helper function getTZ used by get_timezone tool to determine the timezone, defaulting to dayjs.tz.guess().
    const getTZ = (timezon?: string) => { return timezon || dayjs.tz.guess(); };

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/t-shiratori/time-tools-mcp-server'

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