Skip to main content
Glama
Lexmata

Bitbucket Cloud MCP Server

by Lexmata

get_pull_request

Retrieve details of a specific pull request including source, destination, and status from Bitbucket Cloud repositories.

Instructions

Get details of a specific pull request including its source, destination, and status.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
workspaceYesThe workspace slug
repo_slugYesThe repository slug
pr_idYesThe pull request ID

Implementation Reference

  • The main handler for the 'get_pull_request' tool within the ToolHandler class's handleTool method. It parses the input arguments using the Zod schema and delegates to the PullRequestsAPI.get method.
    case 'get_pull_request': {
      const params = toolSchemas.get_pull_request.parse(args);
      return this.prs.get(params.workspace, params.repo_slug, params.pr_id);
    }
  • Zod schema definition for validating inputs to the get_pull_request tool.
    get_pull_request: 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'),
    }),
  • MCP tool registration definition including name, description, and input schema for get_pull_request.
    {
      name: 'get_pull_request',
      description:
        'Get details of a specific pull request including its source, destination, and status.',
      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' },
        },
        required: ['workspace', 'repo_slug', 'pr_id'],
      },
    },
  • The PullRequestsAPI.get method, which performs the actual API call to retrieve the pull request details from Bitbucket.
    async get(workspace: string, repo_slug: string, pr_id: number): Promise<BitbucketPullRequest> {
      return this.client.get<BitbucketPullRequest>(
        `/repositories/${workspace}/${repo_slug}/pullrequests/${pr_id}`
      );
    }
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. It states the tool retrieves details but doesn't disclose behavioral traits such as whether it's read-only (implied by 'Get'), authentication requirements, rate limits, error conditions, or response format. For a tool with zero annotation coverage, this leaves significant gaps in understanding its operation.

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 front-loads the core purpose ('Get details of a specific pull request') and includes key specifics (source, destination, status). There is no wasted verbiage, and every word contributes to understanding the tool's function.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's moderate complexity (3 required parameters, no output schema, no annotations), the description is minimally adequate. It covers the basic purpose but lacks details on behavioral aspects, usage context, and output format. With no output schema, the description should ideally hint at return values, but it doesn't, leaving the agent to guess what 'details' include.

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?

The input schema has 100% description coverage, with clear documentation for all three required parameters (workspace, repo_slug, pr_id). The description adds no additional parameter semantics beyond what the schema provides, such as format examples or constraints. Baseline score of 3 is appropriate since the schema does the heavy lifting.

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 'Get' and resource 'pull request details', specifying what information is retrieved (source, destination, status). It distinguishes from siblings like 'list_pull_requests' by focusing on a specific PR rather than listing multiple. However, it doesn't explicitly differentiate from 'get_pr_diff' which also retrieves PR-specific data.

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?

No explicit guidance on when to use this tool versus alternatives is provided. The description implies usage for retrieving details of a specific pull request, but it doesn't mention prerequisites (e.g., needing a PR ID) or contrast with similar tools like 'get_pr_diff' or 'list_pull_requests'. The agent must infer usage from the name and description 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