{% extends "docs/base.html" %} {% block docs_content %}
Get context for a pull request with reviews, the current user's review, and editability flags.
| Name | Type | Required | Description |
|---|---|---|---|
repo |
string | Yes | Repository path. Format: teams/team_slug/repo_slug or username/repo_slug. |
pull_number |
integer | Yes | The pull request number to retrieve context for. |
curl -X POST https://pearing.example/api/v1/mcp \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-d '{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "get_pull_context",
"arguments": {
"repo": "teams/acme/webapp",
"pull_number": 7
}
}
}'
Returns the pull request object, reviews with reviewer details, the authenticated user's existing review when present, attachment arrays inline on the pull and each review, and permission flags such as can_update_content, can_update_refs, and can_merge. Active attachments include upload detail and content links. The response is returned as a text content block inside the standard MCP tool result.