GitHub pull request context
gh_pr_contextFetches pull request review context in one call, including title, body excerpt, changed files, review states, and comments for read-only code review.
Instructions
Fetch everything needed to review a pull request in one call: title, body excerpt, base/head, size, changed files, review states and review comments. Read-only.
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>",
"number": "<number>"
},
"name": "gh_pr_context"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| repo | Yes | Repository as owner/name | |
| number | Yes | Pull request number |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| base | Yes | ||
| head | Yes | ||
| repo | Yes | Repository as owner/name | |
| draft | Yes | ||
| files | Yes | ||
| state | Yes | ||
| title | Yes | ||
| author | Yes | ||
| number | Yes | ||
| reviews | Yes | ||
| comments | Yes | ||
| additions | Yes | ||
| deletions | Yes | ||
| bodyExcerpt | Yes | ||
| changedFiles | Yes | Files changed in total, which can exceed the files array | |
| filesTruncated | Yes | True when the PR changes more files than the 100 kept |