Skip to main content
Glama

listTimezones

Filter and retrieve all IANA timezones by region or globally. Simplify timezone selection for applications and configurations.

Instructions

List all available IANA timezones

Input Schema

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

Implementation Reference

  • Handler function for the listTimezones tool. Fetches IANA timezones using Intl.supportedValuesOf('timeZone'), filters by optional region, but currently serializes all zones (note: potential bug, uses 'zones' instead of 'filteredZones').
      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 listTimezones tool, defining an optional 'region' parameter for filtering timezones.
    inputSchema: {
      type: 'object',
      properties: {
        region: {
          type: 'string',
          description: 'Filter timezones by region (e.g., America, Europe)',
          optional: true
        }
      }
    },
  • Definition and local registration of the listTimezones tool within the dateTimeTools export object.
    listTimezones: {
      name: 'listTimezones',
      description: 'List all available IANA timezones',
      inputSchema: {
        type: 'object',
        properties: {
          region: {
            type: 'string',
            description: 'Filter timezones by region (e.g., America, Europe)',
            optional: true
          }
        }
      },
      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'}`);
        }
      }
    }
  • src/index.ts:27-33 (registration)
    Global registration of listTimezones by spreading dateTimeTools into the allTools object, which is used by MCP server for tool discovery (list) and execution (call).
    const allTools: ToolKit = {
      ...encodingTools,
      ...geoTools,
      ...generatorTools,
      ...dateTimeTools,
      ...securityTools
    };
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It states the tool lists timezones but doesn't mention any behavioral traits such as whether it's read-only, has rate limits, returns paginated results, or requires authentication. This leaves significant gaps in understanding how the tool behaves beyond its basic function.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that directly states the tool's purpose without any wasted words. It's front-loaded with the core action and resource, making it easy to parse and understand immediately.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's low complexity (one optional parameter, no output schema, no annotations), the description is minimally adequate. It covers the basic purpose but lacks details on behavioral traits and usage context, which are important for a tool that might be used in timezone-related workflows with siblings like 'convertTimezone'.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has 100% description coverage, with the 'region' parameter clearly documented as an optional filter. The description doesn't add any semantic details beyond what the schema provides, such as examples of region values or how filtering works. Since the schema does the heavy lifting, the baseline score of 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('List') and resource ('all available IANA timezones'), making the tool's purpose immediately understandable. However, it doesn't differentiate from sibling tools like 'convertTimezone' or 'geolocate' which might also involve timezone operations, so it doesn't reach the highest score.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives like 'convertTimezone' or 'geolocate'. It lacks context about typical use cases, prerequisites, or exclusions, leaving the agent to infer usage based solely on the tool name and description.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

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/MissionSquad/mcp-helper-tools'

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