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'],
      },
    },
Behavior2/5

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

With no annotations provided, the description carries full burden for behavioral disclosure but offers minimal information. It states it 'lists' comments (implying read-only) but doesn't cover critical behaviors: pagination details (implied by page/pagelen params but not explained), authentication requirements, rate limits, error conditions, or output format. For a tool with 5 parameters and no annotations, this is inadequate.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that states the core functionality without waste. It's front-loaded with the essential action ('List all comments') and resource ('on a pull request'). Every word earns its place, and there's no redundant or verbose phrasing.

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 tool's complexity (5 parameters, no output schema, no annotations), the description is insufficiently complete. It lacks behavioral context (pagination, auth, errors), output details (comment structure, fields), and usage guidance. While the schema covers parameters, the description fails to address broader operational needs, leaving significant gaps for an agent to invoke it correctly.

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 parameters are fully documented in the schema itself. The description adds no additional meaning about parameters—it doesn't explain relationships (e.g., workspace/repo_slug hierarchy), constraints (e.g., valid PR IDs), or usage patterns (e.g., pagination defaults). With high schema coverage, the baseline 3 is appropriate as the description doesn't compensate but doesn't detract either.

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

Purpose4/5

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

The description clearly states the verb ('List') and resource ('comments on a pull request'), making the purpose immediately understandable. It distinguishes from siblings like 'add_pr_comment' (which creates comments) and 'get_pull_request' (which retrieves PR metadata). However, it doesn't specify scope details like 'all' vs 'filtered' or mention pagination behavior, preventing a perfect score.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention prerequisites (e.g., needing workspace/repo access), compare to similar tools like 'get_pull_request' (which might include comments), or indicate use cases (e.g., reviewing feedback, auditing). Without any usage context, the agent must infer from the name alone.

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

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