getTasksMetricsComplete
Retrieve the total count of completed tasks from Teamwork projects to track progress and measure productivity.
Instructions
Get the total count of completed tasks in Teamwork
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- The handler function that executes the tool logic: logs the action, fetches metrics from '/tasks/metrics/complete.json' using the API client, returns formatted JSON response or error.
export async function handleGetTasksMetricsComplete() { try { logger.info('Getting metrics for completed tasks'); // Make API call const apiClient = getApiClientForVersion(); const response = await apiClient.get('/tasks/metrics/complete.json'); return { content: [{ type: "text", text: JSON.stringify(response.data, null, 2) }] }; } catch (error: any) { return createErrorResponse(error, 'Retrieving completed tasks metrics'); } } - The tool schema/definition including name, description, empty input schema (no parameters), and annotations.
export const getTasksMetricsCompleteDefinition = { name: "getTasksMetricsComplete", description: "Get the total count of completed tasks in Teamwork", inputSchema: { type: "object", properties: {}, required: [] }, annotations: { title: "Get the Total Count of Completed Tasks", readOnlyHint: false, destructiveHint: false, openWorldHint: false } }; - src/tools/index.ts:78-78 (registration)Registration of the tool in the central toolPairs array, pairing the definition and handler for inclusion in toolDefinitions and toolHandlersMap.
{ definition: getTasksMetricsComplete, handler: handleGetTasksMetricsComplete },