get_timezone
Retrieve timezone information like Asia/Tokyo for accurate time calculations and scheduling across different regions.
Instructions
Get timezone (e.g. Asia/Tokyo)
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/index.ts:24-33 (handler)Handler and registration for the get_timezone tool. It calls the getTZ helper to return the current timezone as text content.server.tool("get_timezone", "Get timezone (e.g. Asia/Tokyo)", async () => { return { content: [ { type: "text", text: getTZ(), }, ], }; });
- src/index.ts:13-15 (helper)Helper function getTZ used by get_timezone (and other tools) to determine the timezone, defaulting to dayjs.tz.guess() if not provided.const getTZ = (timezon?: string) => { return timezon || dayjs.tz.guess(); };