Skip to main content
Glama

getProjectsReportingUserTaskCompletion

Retrieve task completion statistics for a user. Filter by date, project, team, and more. Generate reports or download.

Instructions

Returns task completions for a given user. Retrieve a person record and its task completion stats.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
userIdYesPath parameter: userId
userTypeNouser type
updatedAfterNodate time
startDateNostart date for task completion report
endDateNoend date for task completion report
searchTermNofilter by comment content
reportFormatNodefine the format of the report
orderModeNoorder mode
orderByNoorder by
lastLoginAfterNoQuery parameter: lastLoginAfter
pageSizeNonumber of items in a page (not used when generating reports)
pageNopage number (not used when generating reports)
skipCountsNoSkipCounts allows you to skip doing counts on a list API endpoint for performance reasons.
showDeletedNoinclude deleted items
searchUserJobRoleNoInclude user job role in search
orderPrioritiseCurrentUserNoForce to have the current/session user in the response
onlySiteOwnerNoQuery parameter: onlySiteOwner
onlyOwnerCompanyNoreturn people only from the owner company. This will replace any provided company ID.
isReportDownloadNogenerate a report document
inclusiveFilterNomake the filter inclusive for user ids, teamIds, companyIds
includeServiceAccountsNoinclude service accounts
includePlaceholdersNoinclude placeholder users
includeCollaboratorsNoexclude collaborators types, returning only account and contact.
includeClientsNoinclude clients
includeArchivedProjectsNoinclude archived projects in the report
filterByNoCostRateNoReturns users who are missing cost rates(OCA only)
excludeContactsNoexclude contact types, returning only account and collaborator.
teamIdsNoteam ids
selectedColumnsNocustomise the report by selecting columns
projectIdsNofilter by project ids
jobRoleIdsNofilter by job role ids
includeNoinclude (not used when generating reports)
idsNofilter by user ids
fieldsTeamsNoQuery parameter: fields[teams]
fieldsPersonNoQuery parameter: fields[person]
fieldsPeopleNoQuery parameter: fields[people]
fieldsCompaniesNoQuery parameter: fields[companies]
fieldsProjectPermissionsNoQuery parameter: fields[ProjectPermissions]
excludeProjectIdsNoexclude people assigned to certain project id
excludeIdsNoexclude certain user ids
companyIdsNocompany ids

Implementation Reference

  • The handler function that executes the 'getProjectsReportingUserTaskCompletion' tool logic. It calls the service function getUserTaskCompletion and returns the result as JSON.
    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 createErrorResponse(error, 'Retrieving user task completion');
      }
    } 
  • Tool definition including inputSchema for the 'getProjectsReportingUserTaskCompletion' tool. Defines all input parameters such as userId (required), userType, dates, filtering options, pagination, etc.
    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
      }
    };
  • Re-export of the handler function from the tools index file.
    export { handleGetProjectsPeopleUtilization } from './people/getPeopleUtilization.js';
    export { handleGetTime } from './time/getTime.js';
    export { handleGetProjectsAllocationsTime } from './time/getAllocationTime.js';
    export { handleGetProjectPerson } from './people/getProjectPerson.js';
    export { handleGetProjectsReportingUserTaskCompletion } from './reporting/getUserTaskCompletion.js';
    export { handleGetProjectsReportingUtilization } from './people/getUtilization.js';
    export { handleGetTimezones } from './core/getTimezones.js'; 
  • Registration of the tool definition paired with its handler in the toolPairs array, which is used to build the toolDefinitions and toolHandlersMap.
    { definition: getProjectsReportingUserTaskCompletion, handler: handleGetProjectsReportingUserTaskCompletion },
    { definition: getProjectsReportingUtilization, handler: handleGetProjectsReportingUtilization },
    { definition: getTimezones, handler: handleGetTimezones }
  • The service/helper function that makes the actual API call to fetch user task completion data from the external API endpoint.
    async function getUserTaskCompletion(params: GetUserTaskCompletionParams) {
      const { userId, ...queryParams } = params;
      const api = ensureApiClient();
      const response = await api.get(`/projects/api/v3/reporting/precanned/usertaskcompletion/${userId}.json`, {
        params: queryParams
      });
      return response.data;
    }
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already provide readOnlyHint=false and destructiveHint=false, but the description adds no behavioral context beyond implying a read operation. It does not disclose any side effects, authentication needs, or data mutation possibilities, which is important given the readOnlyHint is false.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is concise with two sentences, front-loading the core purpose. However, it could be slightly more informative without losing conciseness, such as mentioning that it supports reporting or filtering.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given 41 parameters, no output schema, and complex reporting capabilities, the description is severely incomplete. It doesn't explain pagination, report formats, filtering behavior, or how parameters like isReportDownload work. The agent would lack critical context for correct invocation.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Input schema covers 100% of parameters with descriptions, so the baseline is 3. The description adds minimal value beyond mentioning 'given user' and 'task completions', which map weakly to the many filter and pagination parameters. It does not enhance understanding of parameter usage.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

Description clearly states the tool returns task completions for a given user and retrieves a person record with stats. It uses specific verbs and resources, distinguishing it from sibling tools like getTasksMetricsComplete and getPersonById. However, it doesn't explicitly differentiate from all siblings, such as getProjectsReportingUtilization.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives like getTasksMetricsComplete or getPersonById. It lacks explicit usage context, exclusions, or prerequisites, leaving the agent to infer from the name alone.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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