Skip to main content
Glama

getTasks

Read-onlyIdempotent

Retrieve multiple tasks with optional filters such as date range, priority, status, project, and assignee. Use to manage and report on task data.

Instructions

Get tasks, Return multiple tasks according to the optional provided filter.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
updatedBeforeNofilter by updated before date
updatedAfterNofilter by updated after date
todayNofilter by today
taskFilterNofilter by a taskFilter
startDateNofilter on start date
searchTermNofilter by search term
reportTypeNodefine the type of the report
reportFormatNodefine the format of the report
priorityNofilter by task priority
orderModeNoorder mode
orderByNoorder by
notCompletedBeforeNofilter by projects that have not been completed before the given date
endDateNofilter on end date
dueBeforeNofilter before a due date
dueAfterNofilter after a due date
deletedAfterNofilter on deleted after date
createdFilterNofilter by created filter
createdDateCodeNofilter by created date code
createdBeforeNofilter by created before date
createdAfterNofilter by created after date
completedBeforeNofilter by completed before date
completedAfterNofilter by completed after date
updatedByUserIdNofilter by updated user id
parentTaskIdNofilter by parent task ids
pageSizeNonumber of items in a page
pageNopage number
orderByCustomFieldIdNoorder by custom field id when orderBy is equal to custom field
includeTaskIdNoinclude task id
filterIdNoprovide a user saved filter ID
completedByUserIdNofilter by completed user id
useTaskDateRangeNouse date range logic from table when getting the tasks
useStartDatesForTodaysTasksNouse start dates for todays tasks
useFormulaFieldsNouse formula fields
useAllProjectsNofilter on all projects
sortActiveFirstNosort active tasks first
skipCountsNoSkip counts allows you to skip doing counts on a list API endpoint for performance reasons.
showDeletedNoinclude deleted items
showCompletedListsNoinclude tasks from completed lists
searchCompaniesTeamsNoinclude companies and teams in the search term
searchAssigneesNoinclude assignees in the search
onlyUntaggedTasksNoonly untagged tasks
onlyUnplannedNoonly return tasks that are unplanned. Not assigned, no due date or missing estimated time.
onlyTasksWithUnreadCommentsNofilter by only tasks with unread comments
onlyTasksWithTicketsNofilter by only tasks with tickets
onlyTasksWithEstimatedTimeNoonly return tasks with estimated time
onlyStarredProjectsNofilter by starred projects only
onlyAdminProjectsNoonly include tasks from projects where the user is strictly a project admin. site admins have visibility to all projects.
nestSubTasksNonest sub tasks
matchAllTagsNomatch all tags
matchAllProjectTagsNomatch all project tags
matchAllExcludedTagsNomatch all exclude tags
isReportDownloadNogenerate a report export.
includeUpdateNoinclude tasks latest update action
includeUntaggedTasksNoinclude untagged tasks
includeTomorrowNofilter by include tomorrow
includeTodayNofilter by include today
includeTeamUserIdsNoinclude members of the given teams
includeTasksWithoutDueDatesNoinclude tasks without due dates
includeTasksWithCardsNoinclude tasks with cards
includeTasksFromDeletedListsNoinclude tasks from deleted lists
includeTasksCountNoinclude total count of tasks for given filter
includeRelatedTasksNoinclude ids of active subtasks, dependencies, predecessors
includePrivateItemsNoinclude private items
includeOverdueTasksNoinclude overdue tasks
includeOriginalDueDateNoinclude original due date of a task
includeCustomFieldsNoinclude custom fields
includeCompletedTasksNoinclude completed tasks
includeCompletedPredecessorsNoinclude ids of completed predecessors. It must be provided with includeRelatedTasks flag or with the predecessors sideload.
includeCompanyUserIdsNoinclude members of the given companies
includeCommentStatsNoinclude number of unread and read comments for each task
includeBlockedNofilter by include blocked
includeAttachmentCommentStatsNoinclude number of unread and read comments for each file attachment
includeAssigneeTeamsNoinclude teams related to the responsible user ids
includeAssigneeCompaniesNoinclude companies related to the responsible user ids
includeArchivedProjectsNoinclude archived projects
includeAllCommentsNoinclude all comments
groupByTasklistNogroup by tasklist
groupByTaskgroupNogroup by taskgroup
getSubTasksNoget sub tasks
getFilesNoget files
fallbackToMilestoneDueDateNoset due date as milestone due date if due date is null and there's a related milestone
extractTemplateRoleNameNoFor tasks created in a project template it's possible to assign a role instead of people, companies or teams. This role is then stored with the task name as a prefix. When this flag is enabled it will extract the role name and return it inside a special field.
excludeAssigneeNotOnProjectTeamsNoexclude assignee not on project teams
completedOnlyNoonly completed tasks
checkForRemindersNocheck if task has reminders
allowAssigneesOutsideProjectNowhen filtering by assigned or unassigned tasks, include assignees that are not in the project.
tasksSelectedColumnsNocustomize the report by selecting columns to be displayed for tasks report
tasklistIdsNofilter by tasklist ids
taskgroupIdsNofilter by taskgroup ids
taskIncludedSetNofilter by task included set
tagsNofilter by tag values
tagIdsNofilter by tag ids
statusNofilter by list of task status
skipCRMDealIdsNoskip crm deal ids
selectedColumnsNocustomize the report by selecting columns to be displayed for planned vs actual.
responsiblePartyIdsNofilter by responsible party ids
projectTagIdsNofilter by project tag ids
projectStatusesNofilter by project status
projectOwnerIdsNofilter by project owner ids
projectIdsNofilter by project ids
projectHealthsNofilter by project healths 0: not set 1: bad 2: ok 3: good
projectFeaturesEnabledNofilter by projects that have features enabled
projectCompanyIdsNofilter by company ids
projectCategoryIdsNofilter by project category ids
includeCustomFieldIdsNoinclude specific custom fields
includeNoinclude
idsNofilter by task ids
followedByUserIdsNofilter by followed by user ids
filterBoardColumnIdsNofilter by board column ids
fieldsUsersNoQuery parameter: fields[users]
fieldsTimersNoQuery parameter: fields[timers]
fieldsTeamsNoQuery parameter: fields[teams]
fieldsTasksNoQuery parameter: fields[tasks]
fieldsTasklistsNoQuery parameter: fields[tasklists]
fieldsTaskgroupsNoQuery parameter: fields[taskgroups]
fieldsTaskSequencesNoQuery parameter: fields[taskSequences]
fieldsTagsNoQuery parameter: fields[tags]
fieldsProjectsNoQuery parameter: fields[projects]
fieldsMilestonesNoQuery parameter: fields[milestones]
fieldsLockdownsNoQuery parameter: fields[lockdowns]
fieldsGroupsNoQuery parameter: fields[groups]
fieldsFilesNoQuery parameter: fields[files]
fieldsCustomfieldsNoQuery parameter: fields[customfields]
fieldsCustomfieldTasksNoQuery parameter: fields[customfieldTasks]
fieldsCompaniesNoQuery parameter: fields[companies]
fieldsCommentsNoQuery parameter: fields[comments]
fieldsColumnsNoQuery parameter: fields[columns]
fieldsCardsNoQuery parameter: fields[cards]
fieldsProjectPermissionsNoQuery parameter: fields[ProjectPermissions]
expandedIdsNothe ids of the expanded tasks
excludeTagIdsNofilter by excluded tag ids
crmDealIdsNofilter by crm deal ids
createdByUserIdsNofilter by creator user ids
assigneeTeamIdsNofilter by assignee team ids
assigneeCompanyIdsNofilter by assignee company ids
CustomFieldsNofilter by custom fields

Implementation Reference

  • The main tool handler function 'handleGetTasks' that maps camelCase parameters to API format, calls the teamworkService.getTasks() service, and returns the response formatted as MCP content.
    // Tool handler
    export async function handleGetTasks(input: any) {
      logger.info("Calling teamworkService.getTasks()");
      
      // Map camelCase field names back to API format
      const apiInput: Record<string, any> = { ...input };
    
      // Define the mapping for fields[...] parameters
      const fieldMappings: Record<string, string> = {
        fieldsUsers: "fields[users]",
        fieldsTimers: "fields[timers]",
        fieldsTeams: "fields[teams]",
        fieldsTasks: "fields[tasks]",
        fieldsTasklists: "fields[tasklists]",
        fieldsTaskgroups: "fields[taskgroups]",
        fieldsTaskSequences: "fields[taskSequences]",
        fieldsTags: "fields[tags]",
        fieldsProjects: "fields[projects]",
        fieldsMilestones: "fields[milestones]",
        fieldsLockdowns: "fields[lockdowns]",
        fieldsGroups: "fields[groups]",
        fieldsFiles: "fields[files]",
        fieldsCustomfields: "fields[customfields]",
        fieldsCustomfieldTasks: "fields[customfieldTasks]",
        fieldsCompanies: "fields[companies]",
        fieldsComments: "fields[comments]",
        fieldsColumns: "fields[columns]",
        fieldsCards: "fields[cards]",
        fieldsProjectPermissions: "fields[ProjectPermissions]",
      };
    
      for (const [camelCaseKey, apiKey] of Object.entries(fieldMappings)) {
        if (apiInput[camelCaseKey] !== undefined) {
          apiInput[apiKey] = apiInput[camelCaseKey];
          delete apiInput[camelCaseKey];
        }
      }
      
      try {
        const tasks = await teamworkService.getTasks(apiInput);
        logger.info("Tasks response received");
        
        return {
          content: [{
            type: "text",
            text: JSON.stringify(tasks, null, 2)
          }]
        };
      } catch (error: any) {
        return createErrorResponse(error, 'Retrieving tasks');
      }
    } 
  • The tool definition 'getTasksDefinition' including inputSchema with all filter/pagination parameters (dates, priorities, statuses, task IDs, etc.) and annotations.
    export const getTasksDefinition = {
      name: "getTasks",
      description: "Get tasks, Return multiple tasks according to the optional provided filter.",
      inputSchema: {
      type: "object",
      properties: {
        updatedBefore: {
          type: "string",
          description: "filter by updated before date"
        },
        updatedAfter: {
          type: "string",
          description: "filter by updated after date"
        },
        today: {
          type: "string",
          description: "filter by today"
        },
        taskFilter: {
          type: "string",
          description: "filter by a taskFilter",
          enum: [
            "all",
            "anytime",
            "completed",
            "created",
            "overdue",
            "today",
            "yesterday",
            "started",
            "tomorrow",
            "thisweek",
            "within7",
            "within14",
            "within30",
            "within365",
            "nodate",
            "noduedate",
            "nostartdate",
            "newTaskDefaults",
            "hasDate"
          ]
        },
        startDate: {
          type: "string",
          description: "filter on start date"
        },
        searchTerm: {
          type: "string",
          description: "filter by search term"
        },
        reportType: {
          type: "string",
          description: "define the type of the report",
          enum: [
            "plannedvsactual",
            "task",
            "tasktime"
          ]
        },
        reportFormat: {
          type: "string",
          description: "define the format of the report",
          enum: [
            "html",
            "pdf"
          ]
        },
        priority: {
          type: "string",
          description: "filter by task priority"
        },
        orderMode: {
          type: "string",
          description: "order mode",
          enum: [
            "asc",
            "desc"
          ]
        },
        orderBy: {
          type: "string",
          description: "order by",
          enum: [
            "startdate",
            "createdat",
            "priority",
            "project",
            "flattenedtasklist",
            "company",
            "manual",
            "active",
            "completedat",
            "duestartdate",
            "alldates",
            "tasklistname",
            "tasklistdisplayorder",
            "tasklistid",
            "duedate",
            "updatedat",
            "taskname",
            "createdby",
            "completedby",
            "assignedto",
            "taskstatus",
            "taskduedate",
            "customfield",
            "estimatedtime",
            "boardcolumn",
            "taskgroupid",
            "taskgroupname",
            "taskgroup",
            "displayorder",
            "projectmanual",
            "stagedisplayorder",
            "stage"
          ]
        },
        notCompletedBefore: {
          type: "string",
          description: "filter by projects that have not been completed before the given date"
        },
        endDate: {
          type: "string",
          description: "filter on end date"
        },
        dueBefore: {
          type: "string",
          description: "filter before a due date"
        },
        dueAfter: {
          type: "string",
          description: "filter after a due date"
        },
        deletedAfter: {
          type: "string",
          description: "filter on deleted after date"
        },
        createdFilter: {
          type: "string",
          description: "filter by created filter",
          enum: [
            "anytime",
            "today",
            "yesterday",
            "custom"
          ]
        },
        createdDateCode: {
          type: "string",
          description: "filter by created date code"
        },
        createdBefore: {
          type: "string",
          description: "filter by created before date"
        },
        createdAfter: {
          type: "string",
          description: "filter by created after date"
        },
        completedBefore: {
          type: "string",
          description: "filter by completed before date"
        },
        completedAfter: {
          type: "string",
          description: "filter by completed after date"
        },
        updatedByUserId: {
          type: "integer",
          description: "filter by updated user id"
        },
        parentTaskId: {
          type: "integer",
          description: "filter by parent task ids"
        },
        pageSize: {
          type: "integer",
          description: "number of items in a page"
        },
        page: {
          type: "integer",
          description: "page number"
        },
        orderByCustomFieldId: {
          type: "integer",
          description: "order by custom field id when orderBy is equal to custom field"
        },
        includeTaskId: {
          type: "integer",
          description: "include task id"
        },
        filterId: {
          type: "integer",
          description: "provide a user saved filter ID"
        },
        completedByUserId: {
          type: "integer",
          description: "filter by completed user id"
        },
        useTaskDateRange: {
          type: "boolean",
          description: "use date range logic from table when getting the tasks"
        },
        useStartDatesForTodaysTasks: {
          type: "boolean",
          description: "use start dates for todays tasks"
        },
        useFormulaFields: {
          type: "boolean",
          description: "use formula fields"
        },
        useAllProjects: {
          type: "boolean",
          description: "filter on all projects"
        },
        sortActiveFirst: {
          type: "boolean",
          description: "sort active tasks first"
        },
        skipCounts: {
          type: "boolean",
          description: "Skip counts allows you to skip doing counts on a list API endpoint for performance reasons."
        },
        showDeleted: {
          type: "boolean",
          description: "include deleted items"
        },
        showCompletedLists: {
          type: "boolean",
          description: "include tasks from completed lists"
        },
        searchCompaniesTeams: {
          type: "boolean",
          description: "include companies and teams in the search term"
        },
        searchAssignees: {
          type: "boolean",
          description: "include assignees in the search"
        },
        onlyUntaggedTasks: {
          type: "boolean",
          description: "only untagged tasks"
        },
        onlyUnplanned: {
          type: "boolean",
          description: "only return tasks that are unplanned. Not assigned, no due date or missing estimated time."
        },
        onlyTasksWithUnreadComments: {
          type: "boolean",
          description: "filter by only tasks with unread comments"
        },
        onlyTasksWithTickets: {
          type: "boolean",
          description: "filter by only tasks with tickets"
        },
        onlyTasksWithEstimatedTime: {
          type: "boolean",
          description: "only return tasks with estimated time"
        },
        onlyStarredProjects: {
          type: "boolean",
          description: "filter by starred projects only"
        },
        onlyAdminProjects: {
          type: "boolean",
          description: "only include tasks from projects where the user is strictly a project admin. site admins have visibility to all projects."
        },
        nestSubTasks: {
          type: "boolean",
          description: "nest sub tasks"
        },
        matchAllTags: {
          type: "boolean",
          description: "match all tags"
        },
        matchAllProjectTags: {
          type: "boolean",
          description: "match all project tags"
        },
        matchAllExcludedTags: {
          type: "boolean",
          description: "match all exclude tags"
        },
        isReportDownload: {
          type: "boolean",
          description: "generate a report export."
        },
        includeUpdate: {
          type: "boolean",
          description: "include tasks latest update action"
        },
        includeUntaggedTasks: {
          type: "boolean",
          description: "include untagged tasks"
        },
        includeTomorrow: {
          type: "boolean",
          description: "filter by include tomorrow"
        },
        includeToday: {
          type: "boolean",
          description: "filter by include today"
        },
        includeTeamUserIds: {
          type: "boolean",
          description: "include members of the given teams"
        },
        includeTasksWithoutDueDates: {
          type: "boolean",
          description: "include tasks without due dates"
        },
        includeTasksWithCards: {
          type: "boolean",
          description: "include tasks with cards"
        },
        includeTasksFromDeletedLists: {
          type: "boolean",
          description: "include tasks from deleted lists"
        },
        includeTasksCount: {
          type: "boolean",
          description: "include total count of tasks for given filter"
        },
        includeRelatedTasks: {
          type: "boolean",
          description: "include ids of active subtasks, dependencies, predecessors"
        },
        includePrivateItems: {
          type: "boolean",
          description: "include private items"
        },
        includeOverdueTasks: {
          type: "boolean",
          description: "include overdue tasks"
        },
        includeOriginalDueDate: {
          type: "boolean",
          description: "include original due date of a task"
        },
        includeCustomFields: {
          type: "boolean",
          description: "include custom fields"
        },
        includeCompletedTasks: {
          type: "boolean",
          description: "include completed tasks"
        },
        includeCompletedPredecessors: {
          type: "boolean",
          description: "include ids of completed predecessors. It must be provided with includeRelatedTasks flag or with the predecessors sideload."
        },
        includeCompanyUserIds: {
          type: "boolean",
          description: "include members of the given companies"
        },
        includeCommentStats: {
          type: "boolean",
          description: "include number of unread and read comments for each task"
        },
        includeBlocked: {
          type: "boolean",
          description: "filter by include blocked"
        },
        includeAttachmentCommentStats: {
          type: "boolean",
          description: "include number of unread and read comments for each file attachment"
        },
        includeAssigneeTeams: {
          type: "boolean",
          description: "include teams related to the responsible user ids"
        },
        includeAssigneeCompanies: {
          type: "boolean",
          description: "include companies related to the responsible user ids"
        },
        includeArchivedProjects: {
          type: "boolean",
          description: "include archived projects"
        },
        includeAllComments: {
          type: "boolean",
          description: "include all comments"
        },
        groupByTasklist: {
          type: "boolean",
          description: "group by tasklist"
        },
        groupByTaskgroup: {
          type: "boolean",
          description: "group by taskgroup"
        },
        getSubTasks: {
          type: "boolean",
          description: "get sub tasks"
        },
        getFiles: {
          type: "boolean",
          description: "get files"
        },
        fallbackToMilestoneDueDate: {
          type: "boolean",
          description: "set due date as milestone due date if due date is null and there's a related milestone"
        },
        extractTemplateRoleName: {
          type: "boolean",
          description: "For tasks created in a project template it's possible to assign a role instead of people, companies or teams. This role is then stored with the task name as a prefix. When this flag is enabled it will extract the role name and return it inside a special field."
        },
        excludeAssigneeNotOnProjectTeams: {
          type: "boolean",
          description: "exclude assignee not on project teams"
        },
        completedOnly: {
          type: "boolean",
          description: "only completed tasks"
        },
        checkForReminders: {
          type: "boolean",
          description: "check if task has reminders"
        },
        allowAssigneesOutsideProject: {
          type: "boolean",
          description: "when filtering by assigned or unassigned tasks, include assignees that are not in the project."
        },
        tasksSelectedColumns: {
          type: "array",
          description: "customize the report by selecting columns to be displayed for tasks report"
        },
        tasklistIds: {
          type: "array",
          description: "filter by tasklist ids"
        },
        taskgroupIds: {
          type: "array",
          description: "filter by taskgroup ids"
        },
        taskIncludedSet: {
          type: "array",
          description: "filter by task included set"
        },
        tags: {
          type: "array",
          description: "filter by tag values"
        },
        tagIds: {
          type: "array",
          description: "filter by tag ids"
        },
        status: {
          type: "array",
          description: "filter by list of task status"
        },
        skipCRMDealIds: {
          type: "array",
          description: "skip crm deal ids"
        },
        selectedColumns: {
          type: "array",
          description: "customize the report by selecting columns to be displayed for planned vs actual."
        },
        responsiblePartyIds: {
          type: "array",
          description: "filter by responsible party ids"
        },
        projectTagIds: {
          type: "array",
          description: "filter by project tag ids"
        },
        projectStatuses: {
          type: "array",
          description: "filter by project status"
        },
        projectOwnerIds: {
          type: "array",
          description: "filter by project owner ids"
        },
        projectIds: {
          type: "array",
          description: "filter by project ids"
        },
        projectHealths: {
          type: "array",
          description: "filter by project healths 0: not set 1: bad 2: ok 3: good"
        },
        projectFeaturesEnabled: {
          type: "array",
          description: "filter by projects that have features enabled"
        },
        projectCompanyIds: {
          type: "array",
          description: "filter by company ids"
        },
        projectCategoryIds: {
          type: "array",
          description: "filter by project category ids"
        },
        includeCustomFieldIds: {
          type: "array",
          description: "include specific custom fields"
        },
        include: {
          type: "array",
          description: "include"
        },
        ids: {
          type: "array",
          description: "filter by task ids"
        },
        followedByUserIds: {
          type: "array",
          description: "filter by followed by user ids"
        },
        filterBoardColumnIds: {
          type: "array",
          description: "filter by board column ids"
        },
        fieldsUsers: {
          type: "array",
          description: "Query parameter: fields[users]",
          items: {
            type: "string",
            enum: [
              "id",
              "firstName",
              "lastName",
              "title",
              "email",
              "companyId",
              "company",
              "isAdmin",
              "isClientUser",
              "isServiceAccount",
              "type",
              "deleted",
              "avatarUrl",
              "lengthOfDay",
              "workingHoursId",
              "workingHour",
              "userRate",
              "userCost",
              "canAddProjects"
            ]
          }
        },
        fieldsTimers: {
          type: "array",
          description: "Query parameter: fields[timers]",
          items: {
            type: "string",
            enum: [
              "id",
              "userId",
              "taskId",
              "projectId",
              "description",
              "running",
              "billable",
              "deleted",
              "dateCreated",
              "dateDeleted",
              "duration",
              "lastStartedAt",
              "serverTime",
              "intervals"
            ]
          }
        },
        fieldsTeams: {
          type: "array",
          description: "Query parameter: fields[teams]",
          items: {
            type: "string",
            enum: [
              "id",
              "name",
              "teamLogo",
              "teamLogoIcon",
              "teamLogoColor"
            ]
          }
        },
        fieldsTasks: {
          type: "array",
          description: "Query parameter: fields[tasks]",
          items: {
            type: "string",
            enum: [
              "id",
              "name",
              "dateUpdated",
              "parentTaskId",
              "isPrivate",
              "status",
              "tasklistId",
              "startDate",
              "dueDate"
            ]
          }
        },
        fieldsTasklists: {
          type: "array",
          description: "Query parameter: fields[tasklists]",
          items: {
            type: "string",
            enum: [
              "id",
              "name",
              "projectId",
              "milestoneId"
            ]
          }
        },
        fieldsTaskgroups: {
          type: "array",
          description: "Query parameter: fields[taskgroups]",
          items: {
            type: "string",
            enum: [
              "id",
              "name",
              "description",
              "displayOrder",
              "projectId",
              "status"
            ]
          }
        },
        fieldsTaskSequences: {
          type: "array",
          description: "Query parameter: fields[taskSequences]",
          items: {
            type: "string",
            enum: [
              "id",
              "installationId",
              "frequency",
              "selectedWeekDays",
              "endDate",
              "monthlyRepeatType",
              "duration",
              "rrule"
            ]
          }
        },
        fieldsTags: {
          type: "array",
          description: "Query parameter: fields[tags]",
          items: {
            type: "string",
            enum: [
              "id",
              "name",
              "color",
              "count"
            ]
          }
        },
        fieldsProjects: {
          type: "array",
          description: "Query parameter: fields[projects]",
          items: {
            type: "string",
            enum: [
              "id",
              "name"
            ]
          }
        },
        fieldsMilestones: {
          type: "array",
          description: "Query parameter: fields[milestones]",
          items: {
            type: "string",
            enum: [
              "id",
              "name",
              "description",
              "deadline",
              "completed",
              "projectId",
              "createdOn",
              "lastChangedOn",
              "creatorUserId",
              "reminder",
              "private",
              "lockdownId",
              "status",
              "completedOn",
              "completerId",
              "percentageComplete"
            ]
          }
        },
        fieldsLockdowns: {
          type: "array",
          description: "Query parameter: fields[lockdowns]",
          items: {
            type: "string",
            enum: [
              "id",
              "userID",
              "updatedAt",
              "itemType",
              "itemID",
              "grantAccessTo"
            ]
          }
        },
        fieldsGroups: {
          type: "array",
          description: "Query parameter: fields[groups]",
          items: {
            type: "string",
            enum: [
              "late",
              "today",
              "tomorrow",
              "later-this-week",
              "next-week",
              "later",
              "no-due-date"
            ]
          }
        },
        fieldsFiles: {
          type: "array",
          description: "Query parameter: fields[files]",
          items: {
            type: "string",
            enum: [
              "isPrivate",
              "latestFileVersionNo",
              "versionId",
              "status",
              "description",
              "lockdownId",
              "tagIds",
              "changeFollowers",
              "commentFollowers",
              "originalName",
              "displayName",
              "isLocked",
              "lockedByUserId",
              "lockedDate",
              "size",
              "uploadedDate",
              "uploadedByUserID",
              "updatedAt",
              "deletedAt",
              "deletedBy",
              "fileSource",
              "projectId",
              "numLikes",
              "reactions",
              "versions",
              "downloadURL",
              "previewURL",
              "thumbURL",
              "relatedItems",
              "commentsCount",
              "commentsCountRead",
              "categoryId"
            ]
          }
        },
        fieldsCustomfields: {
          type: "array",
          description: "Query parameter: fields[customfields]",
          items: {
            type: "string",
            enum: [
              "id",
              "projectId",
              "entity",
              "name",
              "description",
              "type",
              "options",
              "visibilities",
              "isPrivate",
              "required",
              "createdAt",
              "createdByUserId",
              "updatedAt",
              "updatedByUserId",
              "deleted",
              "deletedAt",
              "deletedByUserId"
            ]
          }
        },
        fieldsCustomfieldTasks: {
          type: "array",
          description: "Query parameter: fields[customfieldTasks]",
          items: {
            type: "string",
            enum: [
              "id",
              "customfieldId",
              "value",
              "createdAt",
              "createdBy"
            ]
          }
        },
        fieldsCompanies: {
          type: "array",
          description: "Query parameter: fields[companies]",
          items: {
            type: "string",
            enum: [
              "id",
              "name",
              "logoUploadedToServer",
              "logoImage"
            ]
          }
        },
        fieldsComments: {
          type: "array",
          description: "Query parameter: fields[comments]",
          items: {
            type: "string",
            enum: [
              "id",
              "objectType",
              "objectId",
              "title"
            ]
          }
        },
        fieldsColumns: {
          type: "array",
          description: "Query parameter: fields[columns]",
          items: {
            type: "string",
            enum: [
              "id",
              "name",
              "color",
              "displayOrder",
              "createdAt",
              "updatedAt",
              "settings",
              "sort",
              "sortOrder",
              "deletedAt",
              "project",
              "hasTriggers",
              "deleted",
              "stats",
              "defaultTasklist"
            ]
          }
        },
        fieldsCards: {
          type: "array",
          description: "Query parameter: fields[cards]",
          items: {
            type: "string",
            enum: [
              "id",
              "displayOrder",
              "archived",
              "archivedAt",
              "archivedBy",
              "createdAt",
              "createBy",
              "updatedAt",
              "visible",
              "status",
              "deleteBy",
              "deletedAt"
            ]
          }
        },
        fieldsProjectPermissions: {
          type: "array",
          description: "Query parameter: fields[ProjectPermissions]",
          items: {
            type: "string",
            enum: [
              "viewMessagesAndFiles",
              "viewTasksAndMilestones",
              "viewTime",
              "viewNotebooks",
              "viewRiskRegister",
              "viewEstimatedTime",
              "viewInvoices",
              "addTasks",
              "addRisks",
              "manageCustomFields",
              "addExpenses",
              "editAllTasks",
              "addMilestones",
              "addTaskLists",
              "addMessages",
              "addFiles",
              "addTime",
              "addNotebooks",
              "viewLinks",
              "addLinks",
              "canViewForms",
              "addForms",
              "viewAllTimeLogs",
              "setPrivacy",
              "projectAdministrator",
              "viewProjectUpdate",
              "addProjectUpdate",
              "canViewProjectMembers",
              "canViewProjectBudget",
              "canManageProjectBudget",
              "canViewRates",
              "canManageRates",
              "canViewSchedule",
              "canManageSchedule",
              "receiveEmailNotifications",
              "isObserving",
              "isArchived",
              "active",
              "canAccess",
              "inOwnerCompany",
              "canManagePeople",
              "canViewProjectTemplates",
              "canManageProjectTemplates"
            ]
          }
        },
        expandedIds: {
          type: "array",
          description: "the ids of the expanded tasks"
        },
        excludeTagIds: {
          type: "array",
          description: "filter by excluded tag ids"
        },
        crmDealIds: {
          type: "array",
          description: "filter by crm deal ids"
        },
        createdByUserIds: {
          type: "array",
          description: "filter by creator user ids"
        },
        assigneeTeamIds: {
          type: "array",
          description: "filter by assignee team ids"
        },
        assigneeCompanyIds: {
          type: "array",
          description: "filter by assignee company ids"
        },
        CustomFields: {
          type: "array",
          description: "filter by custom fields"
        }
      }
    },
      annotations: {
        title: "Get Tasks from Teamwork",
        readOnlyHint: true,
        destructiveHint: false,
        idempotentHint: true,
        openWorldHint: false
      }
    };
  • Import and registration of getTasks definition and handler in the central tools index. Line 69 registers { definition: getTasks, handler: handleGetTasks } in the toolPairs array, and line 108-111 builds a name-to-handler map.
    import { getTasksDefinition as getTasks, handleGetTasks } from './tasks/getTasks.js';
    import { getTasksByProjectIdDefinition as getTasksByProjectId, handleGetTasksByProjectId } from './tasks/getTasksByProjectId.js';
    import { getTasksByTaskListIdDefinition as getTasksByTaskListId, handleGetTasksByTaskListId } from './tasks/getTasksByTaskListId.js';
    import { getTaskListsByProjectIdDefinition as getTaskListsByProjectId, handleGetTaskListsByProjectId } from './tasks/getTaskListsByProjectId.js';
    import { getTaskByIdDefinition as getTaskById, handleGetTaskById } from './tasks/getTaskById.js';
    import { createTaskDefinition as createTask, handleCreateTask } from './tasks/createTask.js';
    import { createSubTaskDefinition as createSubTask, handleCreateSubTask } from './tasks/createSubTask.js';
    import { updateTaskDefinition as updateTask, handleUpdateTask } from './tasks/updateTask.js';
    import { deleteTaskDefinition as deleteTask, handleDeleteTask } from './tasks/deleteTask.js';
    import { getTasksMetricsCompleteDefinition as getTasksMetricsComplete, handleGetTasksMetricsComplete } from './tasks/getTasksMetricsComplete.js';
    import { getTasksMetricsLateDefinition as getTasksMetricsLate, handleGetTasksMetricsLate } from './tasks/getTasksMetricsLate.js';
    import { getTaskSubtasksDefinition as getTaskSubtasks, handleGetTaskSubtasks } from './tasks/getTaskSubtasks.js';
    import { getTaskCommentsDefinition as getTaskComments, handleGetTaskComments } from './tasks/getTaskComments.js';
    
    // Comments
    import { createCommentDefinition as createComment, handleCreateComment } from './comments/createComment.js';
    
    // People
    import { getPeopleDefinition as getPeople, handleGetPeople } from './people/getPeople.js';
    import { getPersonByIdDefinition as getPersonById, handleGetPersonById } from './people/getPersonById.js';
    import { getProjectPeopleDefinition as getProjectPeople, handleGetProjectPeople } from './people/getProjectPeople.js';
    import { addPeopleToProjectDefinition as addPeopleToProject, handleAddPeopleToProject } from './people/addPeopleToProject.js';
    import { deletePersonDefinition as deletePerson, handleDeletePerson } from './people/deletePerson.js';
    import { updatePersonDefinition as updatePerson, handleUpdatePerson } from './people/updatePerson.js';
    
    // Companies
    import { createCompanyDefinition as createCompany, handleCreateCompany } from './companies/createCompany.js';
    import { updateCompanyDefinition as updateCompany, handleUpdateCompany } from './companies/updateCompany.js';
    import { deleteCompanyDefinition as deleteCompany, handleDeleteCompany } from './companies/deleteCompany.js';
    import { getCompaniesDefinition as getCompanies, handleGetCompanies } from './companies/getCompanies.js';
    import { getCompanyByIdDefinition as getCompanyById, handleGetCompanyById } from './companies/getCompanyById.js';
    
    // Reporting
    import { getProjectsPeopleMetricsPerformanceDefinition as getProjectsPeopleMetricsPerformance, handleGetProjectsPeopleMetricsPerformance } from './people/getPeopleMetricsPerformance.js';
    import { getProjectsPeopleUtilizationDefinition as getProjectsPeopleUtilization, handleGetProjectsPeopleUtilization } from './people/getPeopleUtilization.js';
    import { getProjectPersonDefinition as getProjectPerson, handleGetProjectPerson } from './people/getProjectPerson.js';
    import { getProjectsReportingUserTaskCompletionDefinition as getProjectsReportingUserTaskCompletion, handleGetProjectsReportingUserTaskCompletion } from './reporting/getUserTaskCompletion.js';
    import { getProjectsReportingUtilizationDefinition as getProjectsReportingUtilization, handleGetProjectsReportingUtilization } from './people/getUtilization.js';
    
    // Time-related imports
    import { getTimeDefinition as getTime, handleGetTime } from './time/getTime.js';
    import { getProjectsAllocationsTimeDefinition as getAllocationTime, handleGetProjectsAllocationsTime } from './time/getAllocationTime.js';
    
    // Core
    import { getTimezonesDefinition as getTimezones, handleGetTimezones } from './core/getTimezones.js';
    
    // Define a structure that pairs tool definitions with their handlers
    interface ToolPair {
      definition: any;
      handler: Function;
    }
    
    // Create an array of tool pairs
    const toolPairs: ToolPair[] = [
      { definition: getProjects, handler: handleGetProjects },
      { definition: getCurrentProject, handler: handleGetCurrentProject },
      { definition: createProject, handler: handleCreateProject },
      { definition: getTasks, handler: handleGetTasks },
  • The service layer function 'getTasks' that makes the actual HTTP GET request to the Teamwork API endpoint '/tasks.json' with query parameters.
    export const getTasks = async (params: Record<string, any> = {}) => {
      try {
        const api = ensureApiClient();
        
        // The tool handler is now responsible for ensuring correct parameter names.
        // No filtering is needed here; pass the params directly.
        
        logger.debug(`Making GET request to /tasks.json with params: ${JSON.stringify(params)}`);
        
        const response = await api.get('/tasks.json', { params: params });
        return response.data;
      } catch (error: any) {
        if (error.response) {
            logger.error(`Error fetching tasks: Status ${error.response.status} - ${JSON.stringify(error.response.data)}`);
        } else if (error.request) {
            logger.error(`Error fetching tasks: No response received - ${error.request}`);
        } else {
            logger.error(`Error fetching tasks: ${error.message}`);
        }
        throw new Error(`Failed to fetch tasks from Teamwork API: ${error.message}`);
      }
    };
    
    export default getTasks; 
Behavior3/5

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

Annotations already provide readOnlyHint=true, destructiveHint=false, idempotentHint=true. Description adds minimal context beyond 'Return multiple tasks.' It is consistent with annotations and does not contradict them, but does not elaborate on behavior like pagination or rate limits.

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?

Very concise: two sentences. The first sentence 'Get tasks' is somewhat redundant with the name, but the second sentence adds value. No wasted words, though it could be slightly more structured.

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 the complexity (136 parameters, no output schema, but relatively rich annotations), the description is too minimal. It does not summarize the extensive filtering capabilities, pagination, or common use cases. The schema descriptions compensate partially, but the overall tool description lacks completeness.

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?

Schema description coverage is 100%, so the schema already documents all 136 parameters. The description only adds a generic statement about filtering, which does not add meaningful detail beyond what the schema provides. Baseline 3 is appropriate.

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

Purpose5/5

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

Description clearly states 'Get tasks' and 'Return multiple tasks according to the optional provided filter.' The verb+resource is specific, and it distinguishes from sibling tools like getTaskById (single task) or getTasksByProjectId (scoped to a project).

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

Usage Guidelines3/5

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

Description implies usage via 'optional provided filter' but does not explicitly state when to use this general tool versus more specific siblings like getTasksByProjectId or getTaskListsByProjectId. No alternatives or exclusions are mentioned.

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