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-onlyidempotentMCP toolAgent
Line numbers are true of the snapshot.
Calling it#
curl -X POST http://127.0.0.1:8787/komrad.agent.v1.AgentService/GetReview \
-H 'Content-Type: application/json' \
-d '{
"review_id": "<review_id>"
}'komrad rpc get-review \
--review-id '<uuid>'{
"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 | 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 | Review | The review, with its verdict and body. |
snapshot | ReviewSnapshot | The snapshot the review is written against. |
threads | 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 | uuid* | The review's id. |
task_id | uuid* | The id of the task the review is on. |
snapshot_id | uuid* | The id of the snapshot the review is written against. |
snapshot_ordinal | int32 | The number of the snapshot the review is written against. |
author_kind | ReviewAuthorKind | Who wrote the review. |
author_agent_id | uuid | The id of the agent that wrote the review. Unset when a forge user wrote it. |
verdict | ReviewVerdict | The review's verdict. Unspecified until the review is released. |
released_at | timestamp | When the review was released. Unset until then. |
path | string | The absolute path of the file the released review was written to. |
created_at | timestamp | When the review was created with its first comment. |
updated_at | timestamp | When the review last changed. |
body | string | What the author said about the work as a whole. Empty when the author said nothing. |
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 | 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 | uuid* | The snapshot's id. |
task_id | uuid* | The id of the task the snapshot was taken of. |
ordinal | int32 | The snapshot's number within its task, counting from one. |
base_sha | string | The commit on the base branch that the task's branch started from when the snapshot was taken. |
sha | string | The commit holding the whole worktree, tracked and untracked files alike. |
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 | ReviewThread | The thread, with only the comments released with this review. |
context | string[] | The snapshot's lines around the thread's range, each prefixed with its line number, and |
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 | uuid* | The thread's id. |
task_id | uuid* | The id of the task whose diff the thread is on. |
review_id | uuid | The id of the review a reviewer agent opened the thread in. Unset for a thread the person opened. |
snapshot_id | uuid* | The id of the snapshot the thread is pinned to. |
snapshot_ordinal | int32 | The number of the snapshot the thread is pinned to. |
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 | string | The file's path, relative to the checkout. Empty for a thread on the change as a whole. |
old_start | int32 | The first line of the range on the old side of the diff, counting from one. |
old_end | int32 | The last line of the range on the old side of the diff. |
new_start | int32 | The first line of the range on the new side of the diff, counting from one. |
new_end | int32 | The last line of the range on the new side of the diff. |
quoted_lines | string[] | The diff lines the thread is about, each with its leading marker. |
resolved_at | timestamp | When the thread was resolved. Unset while the thread is open. |
unread_by_human | bool | Whether an agent has replied since the person last read the thread. |
messages | ReviewMessage[] | The thread's comments, oldest first. |
created_at | timestamp | When the thread was created. |
updated_at | timestamp | When the thread last changed. |
mirrors_forge | bool | Whether the thread is copied from a pull request, where replies are public. |
forge_replies | ForgeReply[] | The replies komrad has drafted, posted or failed to post to the forge thread, oldest first. Only the person sees these. |
author_kind | ReviewAuthorKind | Who opened the thread. |
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 | 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 | uuid* | The comment's id. |
thread_id | uuid* | The id of the comment's thread. |
author_kind | ReviewAuthorKind | Who wrote the comment. |
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 | string | The comment's text. |
suggestion | string[] | The lines the author proposes in place of the thread's range. Empty for a plain comment. |
created_at | timestamp | When the comment was written. |
updated_at | timestamp | When the comment was last edited. |
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 | uuid | The id of the snapshot saved with an addressed reply. Unset on every other comment. |
forge | ForgeOrigin | The forge comment this comment was copied from. Unset for a comment written in komrad. |
accepted_from | uuid | The id of the held forge comment the person accepted this comment as a copy of. Unset otherwise. |
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 | timestamp | When the agent read the person's comment. Unset until then, and on every other comment. |
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 | 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 | uuid* | The reply's id. |
thread_id | uuid* | The id of the review thread the reply answers. |
state | ForgeReplyState | How far the reply has got toward the forge. |
body | string | The reply's text. |
approved_at | timestamp | When the person approved the reply for posting. |
sending_started_at | timestamp | When komrad last started posting the reply. Unset until then. |
sent_at | timestamp | When the forge accepted the reply. Unset until then. |
forge_comment_id | uuid | The id of the comment komrad copied back from the forge for the reply. Unset until komrad copies it. |
error | string | What the forge said when it last refused the reply. Unset unless posting failed. |
created_at | timestamp | When the reply was written. |
ForgeOrigin#
ForgeOrigin is the forge comment a review comment was copied from.
| Field | Type | Description |
|---|---|---|
login | string | The forge login of the comment's author. Empty when the forge no longer has the account. |
comment_id | uuid* | The forge comment's id. The forge may have deleted the comment since. |
edited_at | timestamp | When the forge comment was last edited. Unset when it was never edited. |
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.
ReviewVerdict#
ReviewVerdict is what a review concludes about a snapshot.
| Value | Description |
|---|---|
approved | The snapshot is good as it stands. |
changes_requested | The writer has more to do. |
commented | Comments without a conclusion either way. |
ForgeReplyState#
ForgeReplyState is how far a reply komrad posts to the forge has got.