Skip to main content
Glama

getTimezones

Retrieve available timezones from Teamwork to update user timezone settings and ensure accurate scheduling across projects.

Instructions

Get all timezones available in Teamwork. This is useful when you need to update a user's timezone and need to know the available options.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The main handler function for the getTimezones tool. It invokes the teamworkService to retrieve timezones, formats the result as JSON text content, and handles errors using createErrorResponse.
    export async function handleGetTimezones() {
      logger.info('Calling teamworkService.getTimezones()');
      
      try {
        const result = await teamworkService.getTimezones();
        logger.info('Successfully retrieved timezones');
        
        return {
          content: [{
            type: "text",
            text: JSON.stringify(result, null, 2)
          }]
        };
      } catch (error: any) {
        return createErrorResponse(error, 'Retrieving timezones');
      }
    } 
  • The schema/definition for the getTimezones tool, including name, description, empty input schema (no parameters), and annotations indicating it's read-only and non-destructive.
    export const getTimezonesDefinition = {
      name: "getTimezones",
      description: "Get all timezones available in Teamwork. This is useful when you need to update a user's timezone and need to know the available options.",
      inputSchema: {
        type: 'object',
        properties: {},
        required: []
      },
      annotations: {
        title: "Get Timezones",
        readOnlyHint: false,
        destructiveHint: false,
        openWorldHint: false
      }
    };
  • Registration of the getTimezones tool in the central toolPairs array in src/tools/index.ts, associating its definition and handler for use in toolHandlersMap and toolDefinitions.
    { definition: getTimezones, handler: handleGetTimezones }
  • Supporting service function that performs the actual API call to retrieve timezones from Teamwork using the v1 endpoint 'timezones.json', called by the tool handler.
    export const getTimezones = async () => {
      try {
        logger.info('Fetching all timezones');
        
        const api = getApiClientForVersion('v1');
        // Note: This is a v1 API endpoint without the projects/api/v3 prefix
        const response = await api.get('timezones.json');
        
        logger.info(`Successfully retrieved ${response.data.timezones?.length || 0} timezones`);
        return response.data;
      } catch (error: any) {
        logger.error(`Error fetching timezones: ${error.message}`);
        throw new Error(`Failed to fetch timezones: ${error.message}`);
      }
    };
Behavior3/5

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

Annotations already indicate this is a non-destructive, non-read-only operation (readOnlyHint: false, destructiveHint: false). The description adds value by explaining the tool's utility in timezone updates, but doesn't disclose additional behavioral traits like rate limits, authentication needs, or response format. With annotations covering safety, a 3 is appropriate.

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 two sentences that are front-loaded with the core purpose and followed by a practical use case. Every word adds value without redundancy, making it efficient and well-structured.

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

Completeness4/5

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

Given the tool's simplicity (0 parameters, no output schema, non-destructive annotations), the description is reasonably complete. It explains what the tool does and when to use it. However, it doesn't describe the return format (e.g., list of timezone objects), which could be helpful since there's no output schema, preventing a perfect score.

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

Parameters4/5

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

The tool has 0 parameters with 100% schema description coverage. The description doesn't need to explain parameters, and it doesn't add any parameter-specific information. For a zero-parameter tool, the baseline is 4, as there's no gap to compensate for.

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 tool's purpose: 'Get all timezones available in Teamwork.' It specifies the verb ('Get') and resource ('timezones'), and provides context about the Teamwork system. However, it doesn't explicitly differentiate from sibling tools (like getTime), which would require a 5.

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

Usage Guidelines4/5

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

The description provides clear usage context: 'This is useful when you need to update a user's timezone and need to know the available options.' This gives a specific scenario for when to use the tool. It doesn't mention when NOT to use it or name alternatives, so it falls short of a 5.

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

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/Vizioz/Teamwork-MCP'

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