# get\_pull\_request

Get one pull request komrad has recorded, by id, with its description whole.

read-only · idempotent · MCP tool · [Pull Request](https://komrad.dev/latest/api/pull-request.md)

## Calling it

```bash
curl -X POST http://127.0.0.1:8787/komrad.pullrequest.v1.PullRequestService/GetPullRequest \
  -H 'Content-Type: application/json' \
  -d '{
  "id": "<id>"
}'
```

```bash
komrad rpc get-pull-request \
  --id '<uuid>'
```

```json
{
  "name": "get_pull_request",
  "arguments": {
    "id": "<id>"
  }
}
```

Offered by the komrad MCP server to writer, orchestrator agents.

## Request

### GetPullRequestRequest

| Field | Type | Description |
| --- | --- | --- |
| [`id`](https://komrad.dev/latest/api/pull-request/get-pull-request.md#komrad-pullrequest-v1-GetPullRequestRequest-id) | uuid\* | The pull request to get, by id. |

## Response

### GetPullRequestResponse

| Field | Type | Description |
| --- | --- | --- |
| [`pull_request`](https://komrad.dev/latest/api/pull-request/get-pull-request.md#komrad-pullrequest-v1-GetPullRequestResponse-pull_request) | [PullRequest](https://komrad.dev/latest/api/pull-request/get-pull-request.md#komrad-pullrequest-v1-PullRequest) | The pull request, with its description whole. |

## Types

### PullRequest

PullRequest is a pull request as komrad last read it from the forge.

| Field | Type | Description |
| --- | --- | --- |
| [`id`](https://komrad.dev/latest/api/pull-request/get-pull-request.md#komrad-pullrequest-v1-PullRequest-id) | uuid\* | The pull request's id. |
| [`forge`](https://komrad.dev/latest/api/pull-request/get-pull-request.md#komrad-pullrequest-v1-PullRequest-forge) | [Kind](https://komrad.dev/latest/api/pull-request/get-pull-request.md#komrad-forge-v1-Kind) | The kind of forge the pull request is on. |
| [`provider_id`](https://komrad.dev/latest/api/pull-request/get-pull-request.md#komrad-pullrequest-v1-PullRequest-provider_id) | string | The forge's own stable id for the pull request, such as GitHub's `node_id`. |
| [`url`](https://komrad.dev/latest/api/pull-request/get-pull-request.md#komrad-pullrequest-v1-PullRequest-url) | string | The pull request's web address. |
| [`repository_url`](https://komrad.dev/latest/api/pull-request/get-pull-request.md#komrad-pullrequest-v1-PullRequest-repository_url) | string | The web address of the repository the pull request merges into. |
| [`head_repository_url`](https://komrad.dev/latest/api/pull-request/get-pull-request.md#komrad-pullrequest-v1-PullRequest-head_repository_url) | string | The web address of the repository the pull request's branch is in. Empty when the forge no longer has that repository. |
| [`number`](https://komrad.dev/latest/api/pull-request/get-pull-request.md#komrad-pullrequest-v1-PullRequest-number) | int32 | The pull request's number, unique within its repository. |
| [`title`](https://komrad.dev/latest/api/pull-request/get-pull-request.md#komrad-pullrequest-v1-PullRequest-title) | string | The pull request's title. |
| [`head_branch`](https://komrad.dev/latest/api/pull-request/get-pull-request.md#komrad-pullrequest-v1-PullRequest-head_branch) | string | The branch the pull request merges from. |
| [`head_sha`](https://komrad.dev/latest/api/pull-request/get-pull-request.md#komrad-pullrequest-v1-PullRequest-head_sha) | string | The commit at the tip of the pull request's branch. |
| [`base_branch`](https://komrad.dev/latest/api/pull-request/get-pull-request.md#komrad-pullrequest-v1-PullRequest-base_branch) | string | The branch the pull request merges into. |
| [`base_sha`](https://komrad.dev/latest/api/pull-request/get-pull-request.md#komrad-pullrequest-v1-PullRequest-base_sha) | string | The commit at the tip of the branch the pull request merges into. |
| [`draft`](https://komrad.dev/latest/api/pull-request/get-pull-request.md#komrad-pullrequest-v1-PullRequest-draft) | bool | Whether the pull request is a draft. |
| [`state`](https://komrad.dev/latest/api/pull-request/get-pull-request.md#komrad-pullrequest-v1-PullRequest-state) | [PullRequestState](https://komrad.dev/latest/api/pull-request/get-pull-request.md#komrad-pullrequest-v1-PullRequestState) | The pull request's state. |
| [`opened_at`](https://komrad.dev/latest/api/pull-request/get-pull-request.md#komrad-pullrequest-v1-PullRequest-opened_at) | timestamp | When the pull request was opened. |
| [`changed_at`](https://komrad.dev/latest/api/pull-request/get-pull-request.md#komrad-pullrequest-v1-PullRequest-changed_at) | timestamp | When the pull request last changed on the forge. |
| [`merged_at`](https://komrad.dev/latest/api/pull-request/get-pull-request.md#komrad-pullrequest-v1-PullRequest-merged_at) | timestamp | When the pull request merged. Unset until the pull request merges. |
| [`closed_at`](https://komrad.dev/latest/api/pull-request/get-pull-request.md#komrad-pullrequest-v1-PullRequest-closed_at) | timestamp | When the pull request closed, merged or not. Unset while the pull request is open. |
| [`merge_readiness`](https://komrad.dev/latest/api/pull-request/get-pull-request.md#komrad-pullrequest-v1-PullRequest-merge_readiness) | [MergeReadiness](https://komrad.dev/latest/api/pull-request/get-pull-request.md#komrad-pullrequest-v1-MergeReadiness) | How close the forge is to merging the pull request. |
| [`author`](https://komrad.dev/latest/api/pull-request/get-pull-request.md#komrad-pullrequest-v1-PullRequest-author) | string | The login of the pull request's author. Empty when the forge no longer has the account. |
| [`body`](https://komrad.dev/latest/api/pull-request/get-pull-request.md#komrad-pullrequest-v1-PullRequest-body) | string | The pull request's description. Empty when it has none. |

### MergeReadiness

MergeReadiness is how close a pull request's head commit is to merging.

| Field | Type | Description |
| --- | --- | --- |
| [`decision`](https://komrad.dev/latest/api/pull-request/get-pull-request.md#komrad-pullrequest-v1-MergeReadiness-decision) | [ReviewDecision](https://komrad.dev/latest/api/pull-request/get-pull-request.md#komrad-pullrequest-v1-ReviewDecision) | The forge's review decision. |
| [`checks`](https://komrad.dev/latest/api/pull-request/get-pull-request.md#komrad-pullrequest-v1-MergeReadiness-checks) | [Checks](https://komrad.dev/latest/api/pull-request/get-pull-request.md#komrad-pullrequest-v1-Checks) | The state of the checks on the head commit. Unspecified when the forge last reported on an older head. |
| [`mergeability`](https://komrad.dev/latest/api/pull-request/get-pull-request.md#komrad-pullrequest-v1-MergeReadiness-mergeability) | [Mergeability](https://komrad.dev/latest/api/pull-request/get-pull-request.md#komrad-pullrequest-v1-Mergeability) | The forge's mergeability, or the last value for the same head while the forge recomputes it. |
| [`mergeability_unconfirmed`](https://komrad.dev/latest/api/pull-request/get-pull-request.md#komrad-pullrequest-v1-MergeReadiness-mergeability_unconfirmed) | bool | Whether [`mergeability`](https://komrad.dev/latest/api/pull-request/get-pull-request.md#komrad-pullrequest-v1-MergeReadiness-mergeability) is the last value for this head, not yet confirmed by a new read. |
| [`auto_merge`](https://komrad.dev/latest/api/pull-request/get-pull-request.md#komrad-pullrequest-v1-MergeReadiness-auto_merge) | bool | Whether auto-merge is on, so the forge merges once the checks and reviews pass. |
| [`auto_mergeable`](https://komrad.dev/latest/api/pull-request/get-pull-request.md#komrad-pullrequest-v1-MergeReadiness-auto_mergeable) | bool | Whether the forge would let komrad turn auto-merge on now. The forge refuses for a draft, a pull request with nothing left to wait for, and a repository that does not allow auto-merge. |
| [`credential_approved`](https://komrad.dev/latest/api/pull-request/get-pull-request.md#komrad-pullrequest-v1-MergeReadiness-credential_approved) | bool | Whether komrad's credential has an approval standing on the pull request. |
| [`credential_can_approve`](https://komrad.dev/latest/api/pull-request/get-pull-request.md#komrad-pullrequest-v1-MergeReadiness-credential_can_approve) | bool | Whether the forge would take an approval from komrad's credential now. The forge refuses one from the pull request's author and from a user it does not let approve. |
| [`reviewers`](https://komrad.dev/latest/api/pull-request/get-pull-request.md#komrad-pullrequest-v1-MergeReadiness-reviewers) | [Reviewer\[\]](https://komrad.dev/latest/api/pull-request/get-pull-request.md#komrad-pullrequest-v1-Reviewer) | The users who have reviewed the pull request or have a review request waiting, without its author. Empty before the forge has been read. |

### Reviewer

Reviewer is one user who has reviewed a pull request or been asked to.

| Field | Type | Description |
| --- | --- | --- |
| [`login`](https://komrad.dev/latest/api/pull-request/get-pull-request.md#komrad-pullrequest-v1-Reviewer-login) | string | The reviewer's login on the forge. |
| [`verdict`](https://komrad.dev/latest/api/pull-request/get-pull-request.md#komrad-pullrequest-v1-Reviewer-verdict) | [ReviewerVerdict](https://komrad.dev/latest/api/pull-request/get-pull-request.md#komrad-pullrequest-v1-ReviewerVerdict) | Where the reviewer's latest review leaves them. |
| [`requested`](https://komrad.dev/latest/api/pull-request/get-pull-request.md#komrad-pullrequest-v1-Reviewer-requested) | bool | Whether a review request to the reviewer is waiting. |

### Kind

Kind is the kind of forge a host runs.

| Value | Description |
| --- | --- |
| [`github`](https://komrad.dev/latest/api/pull-request/get-pull-request.md#komrad-forge-v1-Kind-github) | GitHub, or a GitHub Enterprise host. |
| [`gitlab`](https://komrad.dev/latest/api/pull-request/get-pull-request.md#komrad-forge-v1-Kind-gitlab) | GitLab, or a self-managed GitLab host. |

### PullRequestState

PullRequestState is the state of a pull request, worked out from the forge's report. A finished state wins over an open one.

| Value | Description |
| --- | --- |
| [`unread`](https://komrad.dev/latest/api/pull-request/get-pull-request.md#komrad-pullrequest-v1-PullRequestState-unread) | Komrad has not read the repository yet. |
| [`none`](https://komrad.dev/latest/api/pull-request/get-pull-request.md#komrad-pullrequest-v1-PullRequestState-none) | Komrad read the repository and found no pull request from the branch. |
| [`open`](https://komrad.dev/latest/api/pull-request/get-pull-request.md#komrad-pullrequest-v1-PullRequestState-open) | Open, without a review decision that decides it. |
| [`approved`](https://komrad.dev/latest/api/pull-request/get-pull-request.md#komrad-pullrequest-v1-PullRequestState-approved) | Open, and the forge would merge it now. |
| [`changes_requested`](https://komrad.dev/latest/api/pull-request/get-pull-request.md#komrad-pullrequest-v1-PullRequestState-changes_requested) | Open, with a reviewer asking for changes. |
| [`draft`](https://komrad.dev/latest/api/pull-request/get-pull-request.md#komrad-pullrequest-v1-PullRequestState-draft) | A draft, whatever its reviews say. |
| [`merged`](https://komrad.dev/latest/api/pull-request/get-pull-request.md#komrad-pullrequest-v1-PullRequestState-merged) | Merged. |
| [`closed`](https://komrad.dev/latest/api/pull-request/get-pull-request.md#komrad-pullrequest-v1-PullRequestState-closed) | Closed without merging. |
| [`failing`](https://komrad.dev/latest/api/pull-request/get-pull-request.md#komrad-pullrequest-v1-PullRequestState-failing) | Open, with a failing check on the head commit, whatever its reviews say. |
| [`approved_waiting`](https://komrad.dev/latest/api/pull-request/get-pull-request.md#komrad-pullrequest-v1-PullRequestState-approved_waiting) | Approved, but behind its base branch or blocked by a branch rule. |
| [`conflicting`](https://komrad.dev/latest/api/pull-request/get-pull-request.md#komrad-pullrequest-v1-PullRequestState-conflicting) | Open, and in conflict with its base branch, whatever its reviews say. |
| [`checks_running`](https://komrad.dev/latest/api/pull-request/get-pull-request.md#komrad-pullrequest-v1-PullRequestState-checks_running) | Open, with checks running on the head commit and no reviewer asking for changes. |
| [`rereview_requested`](https://komrad.dev/latest/api/pull-request/get-pull-request.md#komrad-pullrequest-v1-PullRequestState-rereview_requested) | Open, and every reviewer who asked for changes has been asked to review again. |

### ReviewDecision

ReviewDecision is the forge's decision on a pull request's reviews.

| Value | Description |
| --- | --- |
| [`none`](https://komrad.dev/latest/api/pull-request/get-pull-request.md#komrad-pullrequest-v1-ReviewDecision-none) | The forge reports no decision. |
| [`pending`](https://komrad.dev/latest/api/pull-request/get-pull-request.md#komrad-pullrequest-v1-ReviewDecision-pending) | A required review has not been given. |
| [`approved`](https://komrad.dev/latest/api/pull-request/get-pull-request.md#komrad-pullrequest-v1-ReviewDecision-approved) | The forge counts the pull request as approved. |
| [`changes_requested`](https://komrad.dev/latest/api/pull-request/get-pull-request.md#komrad-pullrequest-v1-ReviewDecision-changes_requested) | A reviewer is asking for changes. |
| [`rereview_requested`](https://komrad.dev/latest/api/pull-request/get-pull-request.md#komrad-pullrequest-v1-ReviewDecision-rereview_requested) | Every reviewer who asked for changes has been asked to review again. |

### Checks

Checks is the overall state of the checks on a pull request's head commit.

| Value | Description |
| --- | --- |
| [`none`](https://komrad.dev/latest/api/pull-request/get-pull-request.md#komrad-pullrequest-v1-Checks-none) | The head commit has no checks. |
| [`pending`](https://komrad.dev/latest/api/pull-request/get-pull-request.md#komrad-pullrequest-v1-Checks-pending) | Checks are still running. |
| [`passing`](https://komrad.dev/latest/api/pull-request/get-pull-request.md#komrad-pullrequest-v1-Checks-passing) | Every check passed. |
| [`failing`](https://komrad.dev/latest/api/pull-request/get-pull-request.md#komrad-pullrequest-v1-Checks-failing) | At least one check failed, and every check has finished. |
| [`failing_running`](https://komrad.dev/latest/api/pull-request/get-pull-request.md#komrad-pullrequest-v1-Checks-failing_running) | At least one check failed, and others are still running. |

### Mergeability

Mergeability is whether the forge would merge a pull request, given its base branch and branch rules.

| Value | Description |
| --- | --- |
| [`unknown`](https://komrad.dev/latest/api/pull-request/get-pull-request.md#komrad-pullrequest-v1-Mergeability-unknown) | The forge has not worked it out yet. |
| [`clean`](https://komrad.dev/latest/api/pull-request/get-pull-request.md#komrad-pullrequest-v1-Mergeability-clean) | The forge would merge the pull request now. |
| [`unstable`](https://komrad.dev/latest/api/pull-request/get-pull-request.md#komrad-pullrequest-v1-Mergeability-unstable) | Some checks are not passing. |
| [`blocked`](https://komrad.dev/latest/api/pull-request/get-pull-request.md#komrad-pullrequest-v1-Mergeability-blocked) | A branch rule is not met, such as a required review. |
| [`behind`](https://komrad.dev/latest/api/pull-request/get-pull-request.md#komrad-pullrequest-v1-Mergeability-behind) | The base branch has commits the pull request's branch does not. |
| [`conflicting`](https://komrad.dev/latest/api/pull-request/get-pull-request.md#komrad-pullrequest-v1-Mergeability-conflicting) | The branch is in conflict with its base branch. |

### ReviewerVerdict

ReviewerVerdict is where one reviewer's latest review of a pull request leaves them.

| Value | Description |
| --- | --- |
| [`none`](https://komrad.dev/latest/api/pull-request/get-pull-request.md#komrad-pullrequest-v1-ReviewerVerdict-none) | The reviewer has not reviewed the pull request. |
| [`approved`](https://komrad.dev/latest/api/pull-request/get-pull-request.md#komrad-pullrequest-v1-ReviewerVerdict-approved) | The reviewer approved. |
| [`changes_requested`](https://komrad.dev/latest/api/pull-request/get-pull-request.md#komrad-pullrequest-v1-ReviewerVerdict-changes_requested) | The reviewer asked for changes. |
| [`commented`](https://komrad.dev/latest/api/pull-request/get-pull-request.md#komrad-pullrequest-v1-ReviewerVerdict-commented) | The reviewer left comments without approving or asking for changes. |
| [`dismissed`](https://komrad.dev/latest/api/pull-request/get-pull-request.md#komrad-pullrequest-v1-ReviewerVerdict-dismissed) | The reviewer's latest review was dismissed. |
