Skip to main content
Glama

getTimezones

Retrieve all available timezones in Teamwork to use when updating a user's timezone settings.

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

  • Tool handler function that calls teamworkService.getTimezones() and returns the result as JSON text content.
    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');
      }
  • Tool definition/schema for getTimezones. No input parameters required.
    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
      }
    };
  • Import and registration of getTimezones in the toolPairs array, mapping its definition to its handler.
    import { getTimezonesDefinition as getTimezones, handleGetTimezones } from './core/getTimezones.js';
    
    // Define a structure that pairs tool definitions with their handlers
    interface ToolPair {
      definition: any;
      handler: Function;
    }
    
    // Create an array of tool pairs
    const toolPairs: ToolPair[] = [
      { definition: getProjects, handler: handleGetProjects },
      { definition: getCurrentProject, handler: handleGetCurrentProject },
      { definition: createProject, handler: handleCreateProject },
      { definition: getTasks, handler: handleGetTasks },
      { definition: getTasksByProjectId, handler: handleGetTasksByProjectId },
      { definition: getTaskListsByProjectId, handler: handleGetTaskListsByProjectId },
      { definition: getTasksByTaskListId, handler: handleGetTasksByTaskListId },
      { definition: getTaskById, handler: handleGetTaskById },
      { definition: createTask, handler: handleCreateTask },
      { definition: createSubTask, handler: handleCreateSubTask },
      { definition: updateTask, handler: handleUpdateTask },
      { definition: deleteTask, handler: handleDeleteTask },
      { definition: getTasksMetricsComplete, handler: handleGetTasksMetricsComplete },
      { definition: getTasksMetricsLate, handler: handleGetTasksMetricsLate },
      { definition: getTaskSubtasks, handler: handleGetTaskSubtasks },
      { definition: getTaskComments, handler: handleGetTaskComments },
      { definition: createComment, handler: handleCreateComment },
      { definition: getPeople, handler: handleGetPeople },
      { definition: getPersonById, handler: handleGetPersonById },
      { definition: getProjectPeople, handler: handleGetProjectPeople },
      { definition: addPeopleToProject, handler: handleAddPeopleToProject },
      { definition: deletePerson, handler: handleDeletePerson },
      { definition: updatePerson, handler: handleUpdatePerson },
      { definition: createCompany, handler: handleCreateCompany },
      { definition: updateCompany, handler: handleUpdateCompany },
      { definition: deleteCompany, handler: handleDeleteCompany },
      { definition: getCompanies, handler: handleGetCompanies },
      { definition: getCompanyById, handler: handleGetCompanyById },
      { definition: getProjectsPeopleMetricsPerformance, handler: handleGetProjectsPeopleMetricsPerformance },
      { definition: getProjectsPeopleUtilization, handler: handleGetProjectsPeopleUtilization },
      { definition: getAllocationTime, handler: handleGetProjectsAllocationsTime },
      { definition: getTime, handler: handleGetTime },
      { definition: getProjectPerson, handler: handleGetProjectPerson },
      { definition: getProjectsReportingUserTaskCompletion, handler: handleGetProjectsReportingUserTaskCompletion },
      { definition: getProjectsReportingUtilization, handler: handleGetProjectsReportingUtilization },
      { definition: getTimezones, handler: handleGetTimezones }
  • Re-export of handleGetTimezones from the tools index.
    export { handleGetTimezones } from './core/getTimezones.js'; 
  • Service function that calls the Teamwork API endpoint 'timezones.json' (v1) and returns the response data.
    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}`);
      }
    };
Behavior1/5

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

The description implies a read-only operation ('Get all timezones'), but the annotation 'readOnlyHint' is set to false, contradicting the description. No additional behavioral details (e.g., side effects, data freshness) are provided. This contradiction severely undermines transparency.

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 consists of two concise sentences that front-load the primary purpose and then add a usage context. Every word adds value, with no redundancy or filler.

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?

The description explains the purpose and use case but lacks detail on the output format (e.g., list of timezone names, codes). Since there is no output schema, the agent is left guessing the return structure. Additionally, no information about authentication or caching is given, though it may be considered standard context.

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 no parameters, so the description adds no parameter-level information beyond the schema. According to guidelines, 0 parameters baseline is 4, and the description does not require parameter details.

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

Purpose5/5

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

The description explicitly states 'Get all timezones available in Teamwork', clearly identifying the verb (get) and resource (timezones). No sibling tool deals with timezones, so it is well-differentiated.

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 specifies a use case: 'when you need to update a user's timezone and need to know the available options.' This provides clear context, though it does not mention when to avoid using the tool or list alternatives, which are unnecessary given the unique functionality.

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