Skip to main content
Glama
jlromano

Bitbucket MCP Server

by jlromano

list_pull_requests

Retrieve pull requests from a Bitbucket repository with filtering options by state (OPEN, MERGED, DECLINED) to manage code review workflows.

Instructions

List pull requests in a repository

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
workspaceYesThe workspace slug
repo_slugYesThe repository slug
stateNoFilter by PR state (OPEN, MERGED, DECLINED)

Implementation Reference

  • The implementation of `listPullRequests` in the `BitbucketClient` class, which makes the API call to Bitbucket.
    async listPullRequests(workspace: string, repoSlug: string, state?: string): Promise<PullRequest[]> {
      const params = state ? { state } : {};
      const response = await this.api.get(`/repositories/${workspace}/${repoSlug}/pullrequests`, { params });
      return response.data.values;
    }
  • The MCP tool handler for 'list_pull_requests' in `src/index.ts`.
    case 'list_pull_requests': {
      const { workspace, repo_slug, state } = args as {
        workspace: string;
        repo_slug: string;
        state?: string;
      };
      const pullRequests = await client.listPullRequests(workspace, repo_slug, state);
      return {
        content: [
          {
            type: 'text',
            text: JSON.stringify(pullRequests, null, 2),
          },
        ],
      };
    }
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states it lists pull requests but doesn't mention critical behaviors like pagination, rate limits, sorting order, or what data is returned (e.g., full details vs. summaries). This leaves significant gaps for an agent to understand how to use it effectively.

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, direct sentence with zero wasted words. It front-loads the core purpose ('List pull requests') efficiently, making it easy to parse and understand at a glance without unnecessary elaboration.

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 complexity of listing pull requests (which involves filtering, pagination, and data formatting), the description is incomplete. With no annotations and no output schema, it fails to address key contextual aspects like return format, error handling, or limitations (e.g., max results). This makes it inadequate for an agent to use the tool confidently without additional assumptions.

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%, with clear descriptions for all parameters (workspace, repo_slug, state) including an enum for state. The description adds no additional parameter semantics beyond what the schema provides, such as explaining relationships between parameters or usage examples, which is acceptable given the high schema coverage.

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 action ('List') and resource ('pull requests in a repository'), making the purpose immediately understandable. However, it doesn't distinguish this tool from sibling tools like 'get_pull_request' (singular) or 'search_code', which could also retrieve PR information in different contexts.

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. For example, it doesn't clarify when to choose 'list_pull_requests' over 'get_pull_request' (for a single PR) or 'search_code' (for broader searches), nor does it mention prerequisites like authentication or repository access.

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

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