getTasksMetricsLate
Analyze and retrieve the total count of late tasks in Teamwork projects using the Teamwork MCP server, enabling efficient tracking of task deadlines and project progress.
Instructions
Get the total count of late tasks in Teamwork
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- The main handler function that implements the logic for the getTasksMetricsLate tool. It fetches late tasks metrics via API and returns the data or error message.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) { logger.error(`Error in getTasksMetricsLate handler: ${error.message}`); return { content: [{ type: "text", text: `Error: ${error.message}` }] }; } }
- The tool definition including name, description, input schema (no inputs 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:79-79 (registration)Registration of the getTasksMetricsLate tool in the central toolPairs array, linking its definition and handler.{ definition: getTasksMetricsLate, handler: handleGetTasksMetricsLate },
- src/tools/index.ts:22-22 (registration)Import of the tool definition and handler from the specific tasks file.import { getTasksMetricsLateDefinition as getTasksMetricsLate, handleGetTasksMetricsLate } from './tasks/getTasksMetricsLate.js';
- src/tools/index.ts:127-127 (registration)Re-export of the handler for use elsewhere.export { handleGetTasksMetricsLate } from './tasks/getTasksMetricsLate.js';