get_pr_diff
Fetch a pull request's unified diff as plain text, with automatic truncation at line boundaries to prevent timeouts on large diffs.
Instructions
Returns the unified diff for a pull request as plain text, capped by default at 100,000 characters (maxChars, hard cap 400,000). Truncation always lands on a line boundary and the response always reports truncated/returnedChars so a truncated diff is never mistaken for the complete one. On very large diffs Bitbucket may time out (HTTP 555); prefer get_pr_commits or a smaller maxChars instead of retrying.
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": {
"repo": "<repo>",
"pr_id": "<pr_id>"
},
"name": "get_pr_diff"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| repo | Yes | ||
| pr_id | Yes | ||
| maxChars | No | ||
| workspace | No |