Skip to main content
Glama

listTimezones

Display all IANA timezones or filter by region to manage timezone data for efficient scheduling, coordination, and system configuration.

Instructions

List all available IANA timezones

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
regionNoFilter timezones by region (e.g., America, Europe)

Implementation Reference

  • The handler function that lists available IANA timezones using Intl.supportedValuesOf('timeZone'), filters by optional region, and returns as JSON.
    handler: async ({ region }: { region?: string }) => { try { // Get list of unique timezone names from Luxon const zones = Array.from(new Set( Intl.supportedValuesOf('timeZone') )); const filteredZones = region ? zones.filter((zone: string) => zone.startsWith(region)) : zones; return { content: [{ type: 'text', text: JSON.stringify(zones, null, 2) }] }; } catch (error) { throw new Error(`Failed to list timezones: ${error instanceof Error ? error.message : 'Unknown error'}`); } }
  • Input schema for the listTimezones tool, allowing an optional 'region' string to filter timezones.
    inputSchema: { type: 'object', properties: { region: { type: 'string', description: 'Filter timezones by region (e.g., America, Europe)', optional: true } } },
  • src/index.ts:28-35 (registration)
    Registration of all tools including dateTimeTools (containing listTimezones) into the allTools object used by MCP server for handling listTools and callTool requests.
    const allTools: ToolKit = { ...systemTools, ...networkTools, ...geoTools, ...generatorTools, ...dateTimeTools, ...securityTools };
  • src/index.ts:9-9 (registration)
    Import of dateTimeTools module containing the listTimezones tool.
    import { dateTimeTools } from './tools/datetime.js';

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/cyanheads/toolkit-mcp-server'

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