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}` ); }

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