get_pull_request_file_diff
Retrieve a structured line-by-line diff for a specific file in a pull request, with hunks, segments, and exact line numbers.
Instructions
Get structured line-by-line diff for a specific file in a pull request. Returns JSON with hunks, segments, and exact line numbers.
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>",
"path": "<path>"
},
"name": "get_pull_request_file_diff"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | The path to the file to diff (e.g., 'src/main.ts') | |
| projectKey | Yes | The Bitbucket project key | |
| contextLines | No | Number of context lines around changes (default: 10) | |
| pullRequestId | Yes | The pull request ID | |
| repositorySlug | Yes | The repository slug |