get_pr_diff
Retrieve the complete diff showing all changes in a Bitbucket Cloud pull request to review modifications before merging.
Instructions
Get the diff for a pull request showing all changes.
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:981-985 (handler)The handler case for the 'get_pr_diff' tool in the ToolHandler class's handleTool method. It parses the input arguments using the schema, calls the PullRequestsAPI.getDiff method to fetch the pull request diff, and returns it wrapped in an object.case 'get_pr_diff': { const params = toolSchemas.get_pr_diff.parse(args); const diff = await this.prs.getDiff(params.workspace, params.repo_slug, params.pr_id); return { diff }; }
- src/tools/index.ts:140-144 (schema)Zod schema definition for the input parameters of the 'get_pr_diff' tool, part of the toolSchemas object.get_pr_diff: 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:555-567 (registration)Tool registration definition in the toolDefinitions array for MCP protocol, specifying the name, description, and JSON schema for input validation.{ name: 'get_pr_diff', description: 'Get the diff for a pull request showing all changes.', 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'], }, },