getTasksMetricsLate
Retrieve the total count of late tasks in Teamwork to identify overdue work and manage project timelines.
Instructions
Get the total count of late tasks in Teamwork
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- The handler function that executes the tool logic. Calls the Teamwork API endpoint /tasks/metrics/late.json and returns the count of late tasks.
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 definition/schema for getTasksMetricsLate. Defines the tool name, description, empty input schema (no parameters required), and annotations.
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 } }; - src/tools/index.ts:127-127 (registration)Re-export of the handler from the tools index file.
export { handleGetTasksMetricsLate } from './tasks/getTasksMetricsLate.js'; - src/tools/index.ts:79-79 (registration)Registration of the tool pair (definition + handler) in the toolPairs array for the MCP server.
{ definition: getTasksMetricsLate, handler: handleGetTasksMetricsLate }, - src/utils/config.ts:251-251 (registration)Configuration grouping: 'getTasksMetricsLate' is listed under the 'Tasks' group in the toolGroups mapping.
'Tasks': ['getTasks', 'getTasksByProjectId', 'getTaskListsByProjectId', 'getTaskById', 'createTask', 'createSubTask', 'updateTask', 'deleteTask', 'getTasksMetricsComplete', 'getTasksMetricsLate', 'getTaskSubtasks', 'getTaskComments'],