Get pull request diff
get_pull_request_diffRead a pull request's unified diff, optionally limited to one file's hunks by exact path. Use it to review code changes with truncation control via max_bytes.
Instructions
Read a pull request's unified diff (owner/repo/index). Pass file_path for just that file's hunks — the exact path from list_pull_request_files, matching either side of a rename. Without it the whole diff is returned, truncated at 64 KiB (raise with max_bytes).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| repo | Yes | Repository name. | |
| index | Yes | Pull request number within the repository. | |
| owner | Yes | Repository owner — user or organization. | |
| file_path | No | Return only this file's hunks. Matches either side of a rename, and must be the exact path as listed by `list_pull_request_files` (no globs). Omit for the whole diff. | |
| max_bytes | No | Cap on the returned diff in bytes (default 65536), applied at a line boundary. Ignored when `file_path` selects a single file. |