get_pull_request_diff
Retrieve pull request diffs to review code changes, optionally filtering by file path and choosing text or JSON output.
Instructions
Get diff for a pull request. Omit path for full PR diff, or specify a file path for a specific file. Supports text and JSON formats.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"projectKey": "<projectKey>",
"repositorySlug": "<repositorySlug>",
"pullRequestId": "<pullRequestId>"
},
"name": "get_pull_request_diff"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | No | Optional path to a specific file (omit for full PR diff) | |
| format | No | Response format: "text" for raw diff, "json" for structured (default: text) | |
| sinceId | No | The since commit hash | |
| untilId | No | The until commit hash | |
| projectKey | Yes | The Bitbucket project key | |
| whitespace | No | Whitespace handling (default: show) | |
| contextLines | No | Number of context lines around changes (default: 10) | |
| pullRequestId | Yes | The pull request ID | |
| repositorySlug | Yes | The repository slug |