getProjectsReportingUserTaskCompletion
Retrieve detailed task completion statistics for a specific user within defined date ranges, project filters, and custom report formats.
Instructions
Returns task completions for a given user. Retrieve a person record and its task completion stats.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| companyIds | No | company ids | |
| endDate | No | end date for task completion report | |
| excludeContacts | No | exclude contact types, returning only account and collaborator. | |
| excludeIds | No | exclude certain user ids | |
| excludeProjectIds | No | exclude people assigned to certain project id | |
| fieldsCompanies | No | Query parameter: fields[companies] | |
| fieldsPeople | No | Query parameter: fields[people] | |
| fieldsPerson | No | Query parameter: fields[person] | |
| fieldsProjectPermissions | No | Query parameter: fields[ProjectPermissions] | |
| fieldsTeams | No | Query parameter: fields[teams] | |
| filterByNoCostRate | No | Returns users who are missing cost rates(OCA only) | |
| ids | No | filter by user ids | |
| include | No | include (not used when generating reports) | |
| includeArchivedProjects | No | include archived projects in the report | |
| includeClients | No | include clients | |
| includeCollaborators | No | exclude collaborators types, returning only account and contact. | |
| includePlaceholders | No | include placeholder users | |
| includeServiceAccounts | No | include service accounts | |
| inclusiveFilter | No | make the filter inclusive for user ids, teamIds, companyIds | |
| isReportDownload | No | generate a report document | |
| jobRoleIds | No | filter by job role ids | |
| lastLoginAfter | No | Query parameter: lastLoginAfter | |
| onlyOwnerCompany | No | return people only from the owner company. This will replace any provided company ID. | |
| onlySiteOwner | No | Query parameter: onlySiteOwner | |
| orderBy | No | order by | |
| orderMode | No | order mode | |
| orderPrioritiseCurrentUser | No | Force to have the current/session user in the response | |
| page | No | page number (not used when generating reports) | |
| pageSize | No | number of items in a page (not used when generating reports) | |
| projectIds | No | filter by project ids | |
| reportFormat | No | define the format of the report | |
| searchTerm | No | filter by comment content | |
| searchUserJobRole | No | Include user job role in search | |
| selectedColumns | No | customise the report by selecting columns | |
| showDeleted | No | include deleted items | |
| skipCounts | No | SkipCounts allows you to skip doing counts on a list API endpoint for performance reasons. | |
| startDate | No | start date for task completion report | |
| teamIds | No | team ids | |
| updatedAfter | No | date time | |
| userId | Yes | Path parameter: userId | |
| userType | No | user type |
Implementation Reference
- The handler function that implements the tool logic. It invokes the underlying service getUserTaskCompletion and returns the result as formatted JSON text or an error message.export async function handleGetProjectsReportingUserTaskCompletion(input: any) { try { const response = await getUserTaskCompletion(input); return { content: [{ type: "text", text: JSON.stringify(response, null, 2) }] }; } catch (error: any) { return { content: [{ type: "text", text: `Error: ${error.message}` }] }; } }
- The tool schema definition, including name, description, detailed input schema with parameters like userId, dates, filters, and annotations.export const getProjectsReportingUserTaskCompletionDefinition = { name: "getProjectsReportingUserTaskCompletion", description: "Returns task completions for a given user. Retrieve a person record and its task completion stats.", inputSchema: { type: 'object', properties: { userId: { type: 'integer', description: 'Path parameter: userId' }, userType: { type: 'string', description: 'user type', enum: ['account', 'collaborator', 'contact'] }, updatedAfter: { type: 'string', description: 'date time' }, startDate: { type: 'string', description: 'start date for task completion report' }, endDate: { type: 'string', description: 'end date for task completion report' }, searchTerm: { type: 'string', description: 'filter by comment content' }, reportFormat: { type: 'string', description: 'define the format of the report' }, orderMode: { type: 'string', description: 'order mode', enum: ['asc', 'desc'] }, orderBy: { type: 'string', description: 'order by', enum: ['id', 'name', 'namecaseinsensitive', 'overduetasks', 'assignedtasks', 'completedtasks', 'projects', 'activeprojects'] }, lastLoginAfter: { type: 'string', description: 'Query parameter: lastLoginAfter' }, pageSize: { type: 'integer', description: 'number of items in a page (not used when generating reports)' }, page: { type: 'integer', description: 'page number (not used when generating reports)' }, skipCounts: { type: 'boolean', description: 'SkipCounts allows you to skip doing counts on a list API endpoint for performance reasons.' }, showDeleted: { type: 'boolean', description: 'include deleted items' }, searchUserJobRole: { type: 'boolean', description: 'Include user job role in search' }, orderPrioritiseCurrentUser: { type: 'boolean', description: 'Force to have the current/session user in the response' }, onlySiteOwner: { type: 'boolean', description: 'Query parameter: onlySiteOwner' }, onlyOwnerCompany: { type: 'boolean', description: 'return people only from the owner company. This will replace any provided company ID.' }, isReportDownload: { type: 'boolean', description: 'generate a report document' }, inclusiveFilter: { type: 'boolean', description: 'make the filter inclusive for user ids, teamIds, companyIds' }, includeServiceAccounts: { type: 'boolean', description: 'include service accounts' }, includePlaceholders: { type: 'boolean', description: 'include placeholder users' }, includeCollaborators: { type: 'boolean', description: 'exclude collaborators types, returning only account and contact.' }, includeClients: { type: 'boolean', description: 'include clients' }, includeArchivedProjects: { type: 'boolean', description: 'include archived projects in the report' }, filterByNoCostRate: { type: 'boolean', description: 'Returns users who are missing cost rates(OCA only)' }, excludeContacts: { type: 'boolean', description: 'exclude contact types, returning only account and collaborator.' }, teamIds: { type: 'array', description: 'team ids' }, selectedColumns: { type: 'array', description: 'customise the report by selecting columns' }, projectIds: { type: 'array', description: 'filter by project ids' }, jobRoleIds: { type: 'array', description: 'filter by job role ids' }, include: { type: 'array', description: 'include (not used when generating reports)' }, ids: { type: 'array', description: 'filter by user ids' }, fieldsTeams: { type: 'array', description: 'Query parameter: fields[teams]' }, fieldsPerson: { type: 'array', description: 'Query parameter: fields[person]' }, fieldsPeople: { type: 'array', description: 'Query parameter: fields[people]' }, fieldsCompanies: { type: 'array', description: 'Query parameter: fields[companies]' }, fieldsProjectPermissions: { type: 'array', description: 'Query parameter: fields[ProjectPermissions]' }, excludeProjectIds: { type: 'array', description: 'exclude people assigned to certain project id' }, excludeIds: { type: 'array', description: 'exclude certain user ids' }, companyIds: { type: 'array', description: 'company ids' } }, required: ['userId'] }, annotations: { title: "Get the Tasks Completed by a User", readOnlyHint: false, destructiveHint: false, openWorldHint: false } };
- src/tools/index.ts:99-99 (registration)Registration of the tool in the central toolPairs array, pairing the definition and handler for the MCP tool registry.{ definition: getProjectsReportingUserTaskCompletion, handler: handleGetProjectsReportingUserTaskCompletion },
- src/tools/index.ts:147-147 (registration)Re-export of the handler function from the specific tool file in the index.ts barrel export.export { handleGetProjectsReportingUserTaskCompletion } from './reporting/getUserTaskCompletion.js';
- src/utils/config.ts:253-253 (helper)Tool grouping in config for filtering and permissions, listing this tool under 'Reporting' category.'Reporting': ['getProjectsReportingUserTaskCompletion', 'getProjectsReportingUtilization'],