count_issues
Count issues in Backlog projects by filtering based on project, issue type, category, version, milestone, status, priority, assignee, keyword, and date ranges for effective issue tracking.
Instructions
Returns count of issues
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| assigneeId | No | Assignee user IDs | |
| categoryId | No | Category IDs | |
| createdSince | No | Created since (yyyy-MM-dd) | |
| createdUntil | No | Created until (yyyy-MM-dd) | |
| createdUserId | No | Created user IDs | |
| dueDateSince | No | Due date since (yyyy-MM-dd) | |
| dueDateUntil | No | Due date until (yyyy-MM-dd) | |
| issueTypeId | No | Issue type IDs | |
| keyword | No | Keyword to search for in issues | |
| milestoneId | No | Milestone IDs | |
| parentIssueId | No | Parent issue IDs | |
| priorityId | No | Priority IDs | |
| projectId | No | Project IDs | |
| resolutionId | No | Resolution IDs | |
| startDateSince | No | Start date since (yyyy-MM-dd) | |
| startDateUntil | No | Start date until (yyyy-MM-dd) | |
| statusId | No | Status IDs | |
| updatedSince | No | Updated since (yyyy-MM-dd) | |
| updatedUntil | No | Updated until (yyyy-MM-dd) | |
| versionId | No | Version IDs |
Implementation Reference
- src/tools/countIssues.ts:131-136 (handler)The handler function implementing the core logic of the 'count_issues' tool. It calls the Backlog API's getIssuesCount method with the input parameters and transforms custom fields.handler: async ({ customFields, ...rest }) => { return backlog.getIssuesCount({ ...rest, ...customFieldFiltersToPayload(customFields), }); },
- src/tools/countIssues.ts:9-117 (schema)Input schema definition for the 'count_issues' tool, defining optional array and string filters for querying issue counts.const countIssuesSchema = buildToolSchema((t) => ({ projectId: z .array(z.number()) .optional() .describe(t('TOOL_COUNT_ISSUES_PROJECT_ID', 'Project IDs')), issueTypeId: z .array(z.number()) .optional() .describe(t('TOOL_COUNT_ISSUES_ISSUE_TYPE_ID', 'Issue type IDs')), categoryId: z .array(z.number()) .optional() .describe(t('TOOL_COUNT_ISSUES_CATEGORY_ID', 'Category IDs')), versionId: z .array(z.number()) .optional() .describe(t('TOOL_COUNT_ISSUES_VERSION_ID', 'Version IDs')), milestoneId: z .array(z.number()) .optional() .describe(t('TOOL_COUNT_ISSUES_MILESTONE_ID', 'Milestone IDs')), statusId: z .array(z.number()) .optional() .describe(t('TOOL_COUNT_ISSUES_STATUS_ID', 'Status IDs')), priorityId: z .array(z.number()) .optional() .describe(t('TOOL_COUNT_ISSUES_PRIORITY_ID', 'Priority IDs')), assigneeId: z .array(z.number()) .optional() .describe(t('TOOL_COUNT_ISSUES_ASSIGNEE_ID', 'Assignee user IDs')), createdUserId: z .array(z.number()) .optional() .describe(t('TOOL_COUNT_ISSUES_CREATED_USER_ID', 'Created user IDs')), resolutionId: z .array(z.number()) .optional() .describe(t('TOOL_COUNT_ISSUES_RESOLUTION_ID', 'Resolution IDs')), parentIssueId: z .array(z.number()) .optional() .describe(t('TOOL_COUNT_ISSUES_PARENT_ISSUE_ID', 'Parent issue IDs')), keyword: z .string() .optional() .describe( t('TOOL_COUNT_ISSUES_KEYWORD', 'Keyword to search for in issues') ), startDateSince: z .string() .optional() .describe( t('TOOL_COUNT_ISSUES_START_DATE_SINCE', 'Start date since (yyyy-MM-dd)') ), startDateUntil: z .string() .optional() .describe( t('TOOL_COUNT_ISSUES_START_DATE_UNTIL', 'Start date until (yyyy-MM-dd)') ), dueDateSince: z .string() .optional() .describe( t('TOOL_COUNT_ISSUES_DUE_DATE_SINCE', 'Due date since (yyyy-MM-dd)') ), dueDateUntil: z .string() .optional() .describe( t('TOOL_COUNT_ISSUES_DUE_DATE_UNTIL', 'Due date until (yyyy-MM-dd)') ), createdSince: z .string() .optional() .describe( t('TOOL_COUNT_ISSUES_CREATED_SINCE', 'Created since (yyyy-MM-dd)') ), createdUntil: z .string() .optional() .describe( t('TOOL_COUNT_ISSUES_CREATED_UNTIL', 'Created until (yyyy-MM-dd)') ), updatedSince: z .string() .optional() .describe( t('TOOL_COUNT_ISSUES_UPDATED_SINCE', 'Updated since (yyyy-MM-dd)') ), updatedUntil: z .string() .optional() .describe( t('TOOL_COUNT_ISSUES_UPDATED_UNTIL', 'Updated until (yyyy-MM-dd)') ), customFields: z .array(buildCustomFieldFilterSchema(t)) .optional() .describe( t( 'TOOL_COUNT_ISSUES_CUSTOM_FIELDS', 'Custom field filters (text, numeric, date, or list)' ) ), }));
- src/tools/countIssues.ts:129-130 (schema)Tool schema configuration using the countIssuesSchema and output IssueCountSchema.schema: z.object(countIssuesSchema(t)), outputSchema: IssueCountSchema,
- src/tools/tools.ts:90-90 (registration)Registration of the 'count_issues' tool within the 'issue' toolset group in the allTools export.countIssuesTool(backlog, helper),