getProjectsPeopleMetricsPerformance
Count completed tasks per user within a specified date range and order results by task completion count to identify top performers.
Instructions
Performance of users completing the most tasks. Count the number of completed tasks by user for the provided period. By default the user with the most completed tasks is shown first.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| startDate | No | Start date for the performance metrics period | |
| endDate | No | End date for the performance metrics period | |
| orderMode | No | Order mode for sorting results |
Implementation Reference
- Handler function that calls the service and returns the response as text content.
export async function handleGetProjectsPeopleMetricsPerformance(input: any) { try { const response = await getPeopleMetricsPerformance(input); return { content: [{ type: "text", text: JSON.stringify(response, null, 2) }] }; } catch (error: any) { return createErrorResponse(error, 'Retrieving people performance metrics'); } } - Tool definition with input schema (startDate, endDate, orderMode) and annotations.
export const getProjectsPeopleMetricsPerformanceDefinition = { name: "getProjectsPeopleMetricsPerformance", description: "Performance of users completing the most tasks. Count the number of completed tasks by user for the provided period. By default the user with the most completed tasks is shown first.", inputSchema: { type: 'object', properties: { startDate: { type: 'string', description: 'Start date for the performance metrics period' }, endDate: { type: 'string', description: 'End date for the performance metrics period' }, orderMode: { type: 'string', description: 'Order mode for sorting results', enum: [ 'asc', 'desc' ] } } }, annotations: { title: "Get the Metrics of People's Performance in Projects", readOnlyHint: false, destructiveHint: false, openWorldHint: false } }; - src/tools/index.ts:94-94 (registration)Tool registered in the toolPairs array with its definition and handler.
{ definition: getProjectsPeopleMetricsPerformance, handler: handleGetProjectsPeopleMetricsPerformance }, - src/tools/index.ts:45-45 (registration)Import of the definition and handler in the tools index.
import { getProjectsPeopleMetricsPerformanceDefinition as getProjectsPeopleMetricsPerformance, handleGetProjectsPeopleMetricsPerformance } from './people/getPeopleMetricsPerformance.js'; - src/tools/index.ts:142-142 (registration)Re-export of the handler from the tools index.
export { handleGetProjectsPeopleMetricsPerformance } from './people/getPeopleMetricsPerformance.js'; - Service layer function that makes the actual API call to /people/metrics/performance.json.
import { getApiClientForVersion } from '../core/apiClient.js'; interface GetPeopleMetricsPerformanceParams { startDate?: string; endDate?: string; orderMode?: 'asc' | 'desc'; } export async function getPeopleMetricsPerformance(params: GetPeopleMetricsPerformanceParams = {}) { const api = getApiClientForVersion('v3'); const response = await api.get('/people/metrics/performance.json', { params }); return response.data; }