Skip to main content
Glama
Lexmata

Bitbucket Cloud MCP Server

by Lexmata

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
NameRequiredDescriptionDefault
workspaceYesThe workspace slug
repo_slugYesThe repository slug
pr_idYesThe pull request ID
pageNoPage number
pagelenNoResults per page

Implementation Reference

  • 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,
      });
    }
  • 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'),
    }),
  • 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'],
      },
    },

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/Lexmata/bitbucket-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server