Skip to main content
Glama

getTasksMetricsComplete

Retrieve the total count of completed tasks from Teamwork projects using the Teamwork MCP server to simplify task management and tracking.

Instructions

Get the total count of completed tasks in Teamwork

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handler function that implements the core logic of the 'getTasksMetricsComplete' tool. It fetches completed tasks metrics via API and returns the JSON response or an error message.
    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) { logger.error(`Error in getTasksMetricsComplete handler: ${error.message}`); return { content: [{ type: "text", text: `Error: ${error.message}` }] }; } }
  • The tool schema/definition specifying name, description, empty input schema (no parameters), and annotations for the MCP tool.
    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 } };
  • Registration of the 'getTasksMetricsComplete' tool in the central toolPairs array, linking its definition and handler for use in the MCP system.
    { definition: getTasksMetricsComplete, handler: handleGetTasksMetricsComplete },

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