Skip to main content
Glama

getTasksMetricsLate

Counts late tasks in Teamwork projects to monitor project delays and track overdue work for timely completion.

Instructions

Get the total count of late tasks in Teamwork

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handler function that implements the core logic of the getTasksMetricsLate tool. It fetches late tasks metrics from the Teamwork API endpoint '/tasks/metrics/late.json', formats the response as JSON text, and handles any errors using createErrorResponse.
    export async function handleGetTasksMetricsLate() { try { logger.info('Getting metrics for late tasks'); // Make API call const apiClient = getApiClientForVersion(); const response = await apiClient.get('/tasks/metrics/late.json'); return { content: [{ type: "text", text: JSON.stringify(response.data, null, 2) }] }; } catch (error: any) { return createErrorResponse(error, 'Retrieving late tasks metrics'); } }
  • The tool schema/definition, specifying the name, description, empty input schema (no parameters required), and annotations for UI hints.
    export const getTasksMetricsLateDefinition = { name: "getTasksMetricsLate", description: "Get the total count of late tasks in Teamwork", inputSchema: { type: "object", properties: {}, required: [] }, annotations: { title: "Get the Total Count of Late Tasks", readOnlyHint: false, destructiveHint: false, openWorldHint: false } };
  • Registration of the tool in the central toolPairs array, linking the definition and handler for inclusion in toolDefinitions and toolHandlersMap.
    { definition: getTasksMetricsLate, handler: handleGetTasksMetricsLate },
  • Import of the tool definition and handler from the specific implementation file.
    import { getTasksMetricsLateDefinition as getTasksMetricsLate, handleGetTasksMetricsLate } from './tasks/getTasksMetricsLate.js';
  • Re-export of the handler for use elsewhere in the codebase.
    export { handleGetTasksMetricsLate } from './tasks/getTasksMetricsLate.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/Vizioz/Teamwork-MCP'

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