list_pr_comments
Retrieve all comments from a Bitbucket Cloud pull request to review feedback, track discussions, and manage code review processes.
Instructions
List all comments on a pull request.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| workspace | Yes | The workspace slug | |
| repo_slug | Yes | The repository slug | |
| pr_id | Yes | The pull request ID | |
| page | No | Page number | |
| pagelen | No | Results per page |
Implementation Reference
- src/tools/index.ts:963-969 (handler)The main handler function for the 'list_pr_comments' tool in the ToolHandler class's handleTool method. It validates input using Zod schema and calls PullRequestsAPI.listComments to fetch PR comments.case 'list_pr_comments': { const params = toolSchemas.list_pr_comments.parse(args); return this.prs.listComments(params.workspace, params.repo_slug, params.pr_id, { page: params.page, pagelen: params.pagelen, }); }
- src/tools/index.ts:123-129 (schema)Zod schema definition for validating input parameters of the list_pr_comments tool.list_pr_comments: z.object({ workspace: z.string().describe('The workspace slug'), repo_slug: z.string().describe('The repository slug'), pr_id: z.number().describe('The pull request ID'), page: z.number().optional().describe('Page number'), pagelen: z.number().optional().describe('Results per page'), }),
- src/tools/index.ts:523-537 (registration)Registration of the 'list_pr_comments' tool in the toolDefinitions array, including name, description, and input schema for MCP.{ name: 'list_pr_comments', description: 'List all comments on a pull request.', inputSchema: { type: 'object' as const, properties: { workspace: { type: 'string', description: 'The workspace slug' }, repo_slug: { type: 'string', description: 'The repository slug' }, pr_id: { type: 'number', description: 'The pull request ID' }, page: { type: 'number', description: 'Page number' }, pagelen: { type: 'number', description: 'Results per page' }, }, required: ['workspace', 'repo_slug', 'pr_id'], }, },