list_issues
Retrieve and filter issues from a Bitbucket Cloud repository to track bugs, tasks, and feature requests with pagination and sorting options.
Instructions
List issues in a repository with optional filtering.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| workspace | Yes | The workspace slug | |
| repo_slug | Yes | The repository slug | |
| q | No | Query string for filtering | |
| sort | No | Sort field | |
| page | No | Page number | |
| pagelen | No | Results per page |
Implementation Reference
- src/tools/index.ts:1024-1027 (handler)Tool handler case for 'list_issues' that validates input with Zod schema and delegates to IssuesAPI.list method.case 'list_issues': { const params = toolSchemas.list_issues.parse(args); return this.issues.list(params); }
- src/tools/index.ts:199-206 (schema)Zod input schema definition for the list_issues tool used for validation in the handler.list_issues: z.object({ workspace: z.string().describe('The workspace slug'), repo_slug: z.string().describe('The repository slug'), q: z.string().optional().describe('Query string for filtering'), sort: z.string().optional().describe('Sort field'), page: z.number().optional().describe('Page number'), pagelen: z.number().optional().describe('Results per page'), }),
- src/tools/index.ts:674-689 (registration)Tool registration in toolDefinitions array, including name, description, and JSON input schema for MCP.{ name: 'list_issues', description: 'List issues in a repository with optional filtering.', inputSchema: { type: 'object' as const, properties: { workspace: { type: 'string', description: 'The workspace slug' }, repo_slug: { type: 'string', description: 'The repository slug' }, q: { type: 'string', description: 'Query string for filtering' }, sort: { type: 'string', description: 'Sort field' }, page: { type: 'number', description: 'Page number' }, pagelen: { type: 'number', description: 'Results per page' }, }, required: ['workspace', 'repo_slug'], }, },
- src/api/issues.ts:15-21 (helper)IssuesAPI.list method invoked by the tool handler, which makes the HTTP GET request to Bitbucket API to list issues.async list(params: ListIssuesParams): Promise<PaginatedResponse<BitbucketIssue>> { const { workspace, repo_slug, ...queryParams } = params; return this.client.get<PaginatedResponse<BitbucketIssue>>( `/repositories/${workspace}/${repo_slug}/issues`, queryParams as Record<string, string | number | undefined> ); }
- src/types/index.ts:328-335 (schema)TypeScript interface for ListIssuesParams used in IssuesAPI.list.export interface ListIssuesParams { workspace: string; repo_slug: string; q?: string; sort?: string; page?: number; pagelen?: number; }