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
| Name | Required | Description | Default |
|---|---|---|---|
| workspace | Yes | The workspace slug | |
| repo_slug | Yes | The repository slug | |
| pr_id | Yes | The pull request ID |
Implementation Reference
- src/tools/index.ts:931-934 (handler)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); }
- src/tools/index.ts:64-68 (schema)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'), }),
- src/tools/index.ts:408-421 (registration)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'], }, },
- src/api/pullrequests.ts:27-31 (helper)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}` ); }