# get\_review

Read one released review in full: the verdict, the note on the work, then each thread with the code it is pinned to.

read-only · idempotent · MCP tool · [Agent](https://komrad.dev/latest/api/agent.md)

Line numbers are true of the snapshot.

## Calling it

```bash
curl -X POST http://127.0.0.1:8787/komrad.agent.v1.AgentService/GetReview \
  -H 'Content-Type: application/json' \
  -d '{
  "review_id": "<review_id>"
}'
```

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

```json
{
  "name": "get_review",
  "arguments": {
    "review_id": "<review_id>"
  }
}
```

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

## Request

### GetReviewRequest

| Field | Type | Description |
| --- | --- | --- |
| [`review_id`](https://komrad.dev/latest/api/agent/get-review.md#komrad-agent-v1-GetReviewRequest-review_id) | uuid\* | The review to read, by id. |

## Response

### GetReviewResponse

GetReviewResponse is one released review in reading order: the verdict and body, then each thread with its code and comments.

| Field | Type | Description |
| --- | --- | --- |
| [`review`](https://komrad.dev/latest/api/agent/get-review.md#komrad-agent-v1-GetReviewResponse-review) | [Review](https://komrad.dev/latest/api/agent/get-review.md#komrad-agent-v1-Review) | The review, with its verdict and body. |
| [`snapshot`](https://komrad.dev/latest/api/agent/get-review.md#komrad-agent-v1-GetReviewResponse-snapshot) | [ReviewSnapshot](https://komrad.dev/latest/api/agent/get-review.md#komrad-agent-v1-ReviewSnapshot) | The snapshot the review is written against. |
| [`threads`](https://komrad.dev/latest/api/agent/get-review.md#komrad-agent-v1-GetReviewResponse-threads) | [ReviewThreadInContext\[\]](https://komrad.dev/latest/api/agent/get-review.md#komrad-agent-v1-ReviewThreadInContext) | The review's threads, by file and line. |

## Types

### Review

Review is a reviewer agent's comments on one snapshot, released to the writer together. The review is private until the agent releases it.

| Field | Type | Description |
| --- | --- | --- |
| [`id`](https://komrad.dev/latest/api/agent/get-review.md#komrad-agent-v1-Review-id) | uuid\* | The review's id. |
| [`task_id`](https://komrad.dev/latest/api/agent/get-review.md#komrad-agent-v1-Review-task_id) | uuid\* | The id of the task the review is on. |
| [`snapshot_id`](https://komrad.dev/latest/api/agent/get-review.md#komrad-agent-v1-Review-snapshot_id) | uuid\* | The id of the snapshot the review is written against. |
| [`snapshot_ordinal`](https://komrad.dev/latest/api/agent/get-review.md#komrad-agent-v1-Review-snapshot_ordinal) | int32 | The number of the snapshot the review is written against. |
| [`author_kind`](https://komrad.dev/latest/api/agent/get-review.md#komrad-agent-v1-Review-author_kind) | [ReviewAuthorKind](https://komrad.dev/latest/api/agent/get-review.md#komrad-agent-v1-ReviewAuthorKind) | Who wrote the review. |
| [`author_agent_id`](https://komrad.dev/latest/api/agent/get-review.md#komrad-agent-v1-Review-author_agent_id) | uuid | The id of the agent that wrote the review. Unset when a forge user wrote it. |
| [`verdict`](https://komrad.dev/latest/api/agent/get-review.md#komrad-agent-v1-Review-verdict) | [ReviewVerdict](https://komrad.dev/latest/api/agent/get-review.md#komrad-agent-v1-ReviewVerdict) | The review's verdict. Unspecified until the review is released. |
| [`released_at`](https://komrad.dev/latest/api/agent/get-review.md#komrad-agent-v1-Review-released_at) | timestamp | When the review was released. Unset until then. |
| [`path`](https://komrad.dev/latest/api/agent/get-review.md#komrad-agent-v1-Review-path) | string | The absolute path of the file the released review was written to. |
| [`created_at`](https://komrad.dev/latest/api/agent/get-review.md#komrad-agent-v1-Review-created_at) | timestamp | When the review was created with its first comment. |
| [`updated_at`](https://komrad.dev/latest/api/agent/get-review.md#komrad-agent-v1-Review-updated_at) | timestamp | When the review last changed. |
| [`body`](https://komrad.dev/latest/api/agent/get-review.md#komrad-agent-v1-Review-body) | string | What the author said about the work as a whole. Empty when the author said nothing. |
| [`open_threads`](https://komrad.dev/latest/api/agent/get-review.md#komrad-agent-v1-Review-open_threads) | int32 | How many of the review's threads are not resolved. A released review with none is finished, whatever its verdict. |
| [`external_login`](https://komrad.dev/latest/api/agent/get-review.md#komrad-agent-v1-Review-external_login) | string | The forge login of the author of a review copied from the forge. Empty otherwise. |

### ReviewSnapshot

ReviewSnapshot is a snapshot of a task's worktree, saved as a commit, that a review is written against. A snapshot never changes.

| Field | Type | Description |
| --- | --- | --- |
| [`id`](https://komrad.dev/latest/api/agent/get-review.md#komrad-agent-v1-ReviewSnapshot-id) | uuid\* | The snapshot's id. |
| [`task_id`](https://komrad.dev/latest/api/agent/get-review.md#komrad-agent-v1-ReviewSnapshot-task_id) | uuid\* | The id of the task the snapshot was taken of. |
| [`ordinal`](https://komrad.dev/latest/api/agent/get-review.md#komrad-agent-v1-ReviewSnapshot-ordinal) | int32 | The snapshot's number within its task, counting from one. |
| [`base_sha`](https://komrad.dev/latest/api/agent/get-review.md#komrad-agent-v1-ReviewSnapshot-base_sha) | string | The commit on the base branch that the task's branch started from when the snapshot was taken. |
| [`sha`](https://komrad.dev/latest/api/agent/get-review.md#komrad-agent-v1-ReviewSnapshot-sha) | string | The commit holding the whole worktree, tracked and untracked files alike. |
| [`created_at`](https://komrad.dev/latest/api/agent/get-review.md#komrad-agent-v1-ReviewSnapshot-created_at) | timestamp | When the snapshot was taken. |

### ReviewThreadInContext

ReviewThreadInContext is one thread of a released review, with the code around it from the snapshot's commit.

| Field | Type | Description |
| --- | --- | --- |
| [`thread`](https://komrad.dev/latest/api/agent/get-review.md#komrad-agent-v1-ReviewThreadInContext-thread) | [ReviewThread](https://komrad.dev/latest/api/agent/get-review.md#komrad-agent-v1-ReviewThread) | The thread, with only the comments released with this review. |
| [`context`](https://komrad.dev/latest/api/agent/get-review.md#komrad-agent-v1-ReviewThreadInContext-context) | string\[\] | The snapshot's lines around the thread's range, each prefixed with its line number, and `>>` on the lines the thread is about. Empty when the snapshot cannot be read. |

### ReviewThread

ReviewThread is a conversation pinned to a range of lines in a snapshot, or on the change as a whole.

| Field | Type | Description |
| --- | --- | --- |
| [`id`](https://komrad.dev/latest/api/agent/get-review.md#komrad-agent-v1-ReviewThread-id) | uuid\* | The thread's id. |
| [`task_id`](https://komrad.dev/latest/api/agent/get-review.md#komrad-agent-v1-ReviewThread-task_id) | uuid\* | The id of the task whose diff the thread is on. |
| [`review_id`](https://komrad.dev/latest/api/agent/get-review.md#komrad-agent-v1-ReviewThread-review_id) | uuid | The id of the review a reviewer agent opened the thread in. Unset for a thread the person opened. |
| [`snapshot_id`](https://komrad.dev/latest/api/agent/get-review.md#komrad-agent-v1-ReviewThread-snapshot_id) | uuid\* | The id of the snapshot the thread is pinned to. |
| [`snapshot_ordinal`](https://komrad.dev/latest/api/agent/get-review.md#komrad-agent-v1-ReviewThread-snapshot_ordinal) | int32 | The number of the snapshot the thread is pinned to. |
| [`base_sha`](https://komrad.dev/latest/api/agent/get-review.md#komrad-agent-v1-ReviewThread-base_sha) | string | The commit the old side of the line numbers is read against. This is the snapshot's base unless the diff was narrowed to an earlier snapshot. |
| [`file_path`](https://komrad.dev/latest/api/agent/get-review.md#komrad-agent-v1-ReviewThread-file_path) | string | The file's path, relative to the checkout. Empty for a thread on the change as a whole. |
| [`old_start`](https://komrad.dev/latest/api/agent/get-review.md#komrad-agent-v1-ReviewThread-old_start) | int32 | The first line of the range on the old side of the diff, counting from one. |
| [`old_end`](https://komrad.dev/latest/api/agent/get-review.md#komrad-agent-v1-ReviewThread-old_end) | int32 | The last line of the range on the old side of the diff. |
| [`new_start`](https://komrad.dev/latest/api/agent/get-review.md#komrad-agent-v1-ReviewThread-new_start) | int32 | The first line of the range on the new side of the diff, counting from one. |
| [`new_end`](https://komrad.dev/latest/api/agent/get-review.md#komrad-agent-v1-ReviewThread-new_end) | int32 | The last line of the range on the new side of the diff. |
| [`quoted_lines`](https://komrad.dev/latest/api/agent/get-review.md#komrad-agent-v1-ReviewThread-quoted_lines) | string\[\] | The diff lines the thread is about, each with its leading marker. |
| [`resolved_at`](https://komrad.dev/latest/api/agent/get-review.md#komrad-agent-v1-ReviewThread-resolved_at) | timestamp | When the thread was resolved. Unset while the thread is open. |
| [`unread_by_human`](https://komrad.dev/latest/api/agent/get-review.md#komrad-agent-v1-ReviewThread-unread_by_human) | bool | Whether an agent has replied since the person last read the thread. |
| [`messages`](https://komrad.dev/latest/api/agent/get-review.md#komrad-agent-v1-ReviewThread-messages) | [ReviewMessage\[\]](https://komrad.dev/latest/api/agent/get-review.md#komrad-agent-v1-ReviewMessage) | The thread's comments, oldest first. |
| [`created_at`](https://komrad.dev/latest/api/agent/get-review.md#komrad-agent-v1-ReviewThread-created_at) | timestamp | When the thread was created. |
| [`updated_at`](https://komrad.dev/latest/api/agent/get-review.md#komrad-agent-v1-ReviewThread-updated_at) | timestamp | When the thread last changed. |
| [`mirrors_forge`](https://komrad.dev/latest/api/agent/get-review.md#komrad-agent-v1-ReviewThread-mirrors_forge) | bool | Whether the thread is copied from a pull request, where replies are public. |
| [`forge_replies`](https://komrad.dev/latest/api/agent/get-review.md#komrad-agent-v1-ReviewThread-forge_replies) | [ForgeReply\[\]](https://komrad.dev/latest/api/agent/get-review.md#komrad-agent-v1-ForgeReply) | The replies komrad has drafted, posted or failed to post to the forge thread, oldest first. Only the person sees these. |
| [`author_kind`](https://komrad.dev/latest/api/agent/get-review.md#komrad-agent-v1-ReviewThread-author_kind) | [ReviewAuthorKind](https://komrad.dev/latest/api/agent/get-review.md#komrad-agent-v1-ReviewAuthorKind) | Who opened the thread. |
| [`author_agent_id`](https://komrad.dev/latest/api/agent/get-review.md#komrad-agent-v1-ReviewThread-author_agent_id) | uuid | The id of the agent that opened the thread. Unset when the person or a forge user opened it. |
| [`forge_url`](https://komrad.dev/latest/api/agent/get-review.md#komrad-agent-v1-ReviewThread-forge_url) | string | The web address of the thread's first comment on the forge. Empty for a thread opened in komrad. |

### ReviewMessage

ReviewMessage is one comment in a review thread.

| Field | Type | Description |
| --- | --- | --- |
| [`id`](https://komrad.dev/latest/api/agent/get-review.md#komrad-agent-v1-ReviewMessage-id) | uuid\* | The comment's id. |
| [`thread_id`](https://komrad.dev/latest/api/agent/get-review.md#komrad-agent-v1-ReviewMessage-thread_id) | uuid\* | The id of the comment's thread. |
| [`author_kind`](https://komrad.dev/latest/api/agent/get-review.md#komrad-agent-v1-ReviewMessage-author_kind) | [ReviewAuthorKind](https://komrad.dev/latest/api/agent/get-review.md#komrad-agent-v1-ReviewAuthorKind) | Who wrote the comment. |
| [`author_agent_id`](https://komrad.dev/latest/api/agent/get-review.md#komrad-agent-v1-ReviewMessage-author_agent_id) | uuid | The id of the agent that wrote the comment. Unset when the person or a forge user wrote it, or when the agent was deleted. |
| [`body`](https://komrad.dev/latest/api/agent/get-review.md#komrad-agent-v1-ReviewMessage-body) | string | The comment's text. |
| [`suggestion`](https://komrad.dev/latest/api/agent/get-review.md#komrad-agent-v1-ReviewMessage-suggestion) | string\[\] | The lines the author proposes in place of the thread's range. Empty for a plain comment. |
| [`created_at`](https://komrad.dev/latest/api/agent/get-review.md#komrad-agent-v1-ReviewMessage-created_at) | timestamp | When the comment was written. |
| [`updated_at`](https://komrad.dev/latest/api/agent/get-review.md#komrad-agent-v1-ReviewMessage-updated_at) | timestamp | When the comment was last edited. |
| [`review_id`](https://komrad.dev/latest/api/agent/get-review.md#komrad-agent-v1-ReviewMessage-review_id) | uuid | The id of the review a reviewer agent released the comment with. Unset for the person's comments and the writer's replies. |
| [`snapshot_id`](https://komrad.dev/latest/api/agent/get-review.md#komrad-agent-v1-ReviewMessage-snapshot_id) | uuid | The id of the snapshot saved with an addressed reply. Unset on every other comment. |
| [`forge`](https://komrad.dev/latest/api/agent/get-review.md#komrad-agent-v1-ReviewMessage-forge) | [ForgeOrigin](https://komrad.dev/latest/api/agent/get-review.md#komrad-agent-v1-ForgeOrigin) | The forge comment this comment was copied from. Unset for a comment written in komrad. |
| [`accepted_from`](https://komrad.dev/latest/api/agent/get-review.md#komrad-agent-v1-ReviewMessage-accepted_from) | uuid | The id of the held forge comment the person accepted this comment as a copy of. Unset otherwise. |
| [`held`](https://komrad.dev/latest/api/agent/get-review.md#komrad-agent-v1-ReviewMessage-held) | bool | Whether the comment is kept from the agent, because a forge user without write access wrote the comment or its thread, or the person held it or its thread from the writer when posting it. |
| [`read_at`](https://komrad.dev/latest/api/agent/get-review.md#komrad-agent-v1-ReviewMessage-read_at) | timestamp | When the agent read the person's comment. Unset until then, and on every other comment. |
| [`read_snapshot_id`](https://komrad.dev/latest/api/agent/get-review.md#komrad-agent-v1-ReviewMessage-read_snapshot_id) | uuid | The id of the snapshot taken as the agent read the person's comment, which an addressed reply is compared against. Unset until then, and on every other comment. |
| [`held_by_person`](https://komrad.dev/latest/api/agent/get-review.md#komrad-agent-v1-ReviewMessage-held_by_person) | bool | Whether the person held this forge comment from the writer when posting it, which keeps it, and the thread it opens, from the agent for good. |

### ForgeReply

ForgeReply is a reply komrad posts for the person on a thread copied from the forge.

| Field | Type | Description |
| --- | --- | --- |
| [`id`](https://komrad.dev/latest/api/agent/get-review.md#komrad-agent-v1-ForgeReply-id) | uuid\* | The reply's id. |
| [`thread_id`](https://komrad.dev/latest/api/agent/get-review.md#komrad-agent-v1-ForgeReply-thread_id) | uuid\* | The id of the review thread the reply answers. |
| [`state`](https://komrad.dev/latest/api/agent/get-review.md#komrad-agent-v1-ForgeReply-state) | [ForgeReplyState](https://komrad.dev/latest/api/agent/get-review.md#komrad-agent-v1-ForgeReplyState) | How far the reply has got toward the forge. |
| [`body`](https://komrad.dev/latest/api/agent/get-review.md#komrad-agent-v1-ForgeReply-body) | string | The reply's text. |
| [`approved_at`](https://komrad.dev/latest/api/agent/get-review.md#komrad-agent-v1-ForgeReply-approved_at) | timestamp | When the person approved the reply for posting. |
| [`sending_started_at`](https://komrad.dev/latest/api/agent/get-review.md#komrad-agent-v1-ForgeReply-sending_started_at) | timestamp | When komrad last started posting the reply. Unset until then. |
| [`sent_at`](https://komrad.dev/latest/api/agent/get-review.md#komrad-agent-v1-ForgeReply-sent_at) | timestamp | When the forge accepted the reply. Unset until then. |
| [`forge_comment_id`](https://komrad.dev/latest/api/agent/get-review.md#komrad-agent-v1-ForgeReply-forge_comment_id) | uuid | The id of the comment komrad copied back from the forge for the reply. Unset until komrad copies it. |
| [`error`](https://komrad.dev/latest/api/agent/get-review.md#komrad-agent-v1-ForgeReply-error) | string | What the forge said when it last refused the reply. Unset unless posting failed. |
| [`created_at`](https://komrad.dev/latest/api/agent/get-review.md#komrad-agent-v1-ForgeReply-created_at) | timestamp | When the reply was written. |

### ForgeOrigin

ForgeOrigin is the forge comment a review comment was copied from.

| Field | Type | Description |
| --- | --- | --- |
| [`login`](https://komrad.dev/latest/api/agent/get-review.md#komrad-agent-v1-ForgeOrigin-login) | string | The forge login of the comment's author. Empty when the forge no longer has the account. |
| [`comment_id`](https://komrad.dev/latest/api/agent/get-review.md#komrad-agent-v1-ForgeOrigin-comment_id) | uuid\* | The forge comment's id. The forge may have deleted the comment since. |
| [`edited_at`](https://komrad.dev/latest/api/agent/get-review.md#komrad-agent-v1-ForgeOrigin-edited_at) | timestamp | When the forge comment was last edited. Unset when it was never edited. |
| [`yours`](https://komrad.dev/latest/api/agent/get-review.md#komrad-agent-v1-ForgeOrigin-yours) | bool | Whether the person wrote the forge comment, as the account komrad connects to the forge with. Always false on a connection made from a GitHub App. |

### ReviewAuthorKind

ReviewAuthorKind is who wrote a review or comment.

| Value | Description |
| --- | --- |
| [`human`](https://komrad.dev/latest/api/agent/get-review.md#komrad-agent-v1-ReviewAuthorKind-human) | The person. |
| [`agent`](https://komrad.dev/latest/api/agent/get-review.md#komrad-agent-v1-ReviewAuthorKind-agent) | An agent, either the writer or a reviewer. |
| [`forge`](https://komrad.dev/latest/api/agent/get-review.md#komrad-agent-v1-ReviewAuthorKind-forge) | A forge user, whose comment komrad copied from the pull request. |

### ReviewVerdict

ReviewVerdict is what a review concludes about a snapshot.

| Value | Description |
| --- | --- |
| [`approved`](https://komrad.dev/latest/api/agent/get-review.md#komrad-agent-v1-ReviewVerdict-approved) | The snapshot is good as it stands. |
| [`changes_requested`](https://komrad.dev/latest/api/agent/get-review.md#komrad-agent-v1-ReviewVerdict-changes_requested) | The writer has more to do. |
| [`commented`](https://komrad.dev/latest/api/agent/get-review.md#komrad-agent-v1-ReviewVerdict-commented) | Comments without a conclusion either way. |

### ForgeReplyState

ForgeReplyState is how far a reply komrad posts to the forge has got.

| Value | Description |
| --- | --- |
| [`approved`](https://komrad.dev/latest/api/agent/get-review.md#komrad-agent-v1-ForgeReplyState-approved) | Approved and waiting to be posted. |
| [`sending`](https://komrad.dev/latest/api/agent/get-review.md#komrad-agent-v1-ForgeReplyState-sending) | Being posted. The forge may already have it. |
| [`sent`](https://komrad.dev/latest/api/agent/get-review.md#komrad-agent-v1-ForgeReplyState-sent) | Accepted by the forge. |
| [`failed`](https://komrad.dev/latest/api/agent/get-review.md#komrad-agent-v1-ForgeReplyState-failed) | Refused by the forge on the latest attempt, waiting for the person to retry or discard it. |
