Get pull request diff
get_pr_diffRetrieve a pull request's changed files and unified diff hunks, trimming patches to a character budget and skipping lock/build files so you can review changes and request omitted files.
Instructions
Get the changed files and unified diff hunks of a pull request. Patches are trimmed to whole hunks within a character budget; lock files and build output are skipped. Every file is listed, and files without a patch have an 'omitted' reason. If 'truncated' is true, call again with 'files' to read specific files in full.
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": {
"owner": "<owner>",
"repo": "<repo>",
"pullNumber": "<pullNumber>"
},
"name": "get_pr_diff"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| repo | Yes | Repository name, e.g. 'next.js' | |
| files | No | Only return these file paths. Use this to drill into files that were truncated or omitted in an earlier call. | |
| owner | Yes | Repository owner (user or org), e.g. 'vercel' | |
| maxChars | No | Character budget for all patches combined (roughly 4 characters per token) | |
| pullNumber | Yes | Pull request number |