get_review
Read one released review whole, which is what the mail announcing a release tells you to do with the review id it names.
Agentread-onlyidempotentMCP tool
It comes back in reading order: the verdict and what the reviewer said about the work as a whole, then each thread with the file and lines it is pinned to, the lines it quoted, the code around them as the round's snapshot held it with the commented lines marked, and the messages that went out with this release, so on a later round only the new comments are here. Those line numbers are true of the snapshot rather than of your files now, so once you have edited, search for the quoted text rather than counting lines. Answer each thread with add_review_message, naming its id; list_review_threads is for looking a thread up again afterwards. You may read a review of your own work and of the work of the agent you are a child of, and anybody else's is refused as permission_denied. A review nobody has released is not_found for anyone but its author.
Calling it#
curl -X POST http://127.0.0.1:8787/agent.v1.AgentService/GetReview \
-H 'Content-Type: application/json' \
-d '{
"reviewId": "<reviewId>"
}'komrad rpc get-review \
--review-id <string>{
"name": "get_review",
"arguments": {
"reviewId": "<reviewId>"
}
}Offered by the komrad MCP server to implementer, reviewer, orchestrator agents.
Request#
GetReviewRequest#
| Field | Type | Description |
|---|---|---|
reviewId | string | Which review to read, which the mail announcing a release names. required |
Response#
GetReviewResponse#
GetReviewResponse is one released review whole, in reading order: the verdict and what the reviewer said about the work, then each thread with its anchor, the code around it, and the messages that went out with this release.
| Field | Type | Description |
|---|---|---|
review | Review | The review, carrying its verdict and body. |
round | ReviewRound | The round the review was given against. |
threads | list of ReviewThreadInContext | The threads this review wrote in, ordered by file and line. |
Types#
Review#
Review is one author's batch of comments against one round, private while it is written and released as a whole, the way a pending review on a forge is.
| Field | Type | Description |
|---|---|---|
id | string | The handle the threads in this batch name it by. |
agentId | string | Whose work is being read. |
roundId | string | The snapshot the batch was written against. |
roundOrdinal | int32 | Which round that is, counting from one, so a caller need not fetch the round to say. |
authorKind | ReviewAuthorKind | Whether a person or an agent wrote it. |
authorAgentId | string | The agent giving the review, absent when the person reviewing is. |
verdict | ReviewVerdict | What the author concluded, unspecified while the review is still open. |
releasedAt | string | When the review was let go of, empty while nothing in it has reached the agent. |
path | string | The absolute path the released review was written to. |
deliveredAt | string | When the agent claimed the mail that told it the review was waiting. |
createdAt | string | When the batch was opened, which is the first comment written into it. |
updatedAt | string | When anything in it last moved. |
body | string | What the author said about the work as a whole rather than about any one line, empty when they said nothing. |
openThreads | int32 | How many of this review's comments nobody has settled. A released review with none left is finished, which the verdict does not say, since a verdict is what its author concluded at the time rather than what has happened since. |
ReviewRound#
ReviewRound is one immutable snapshot of what an agent has written, which is what a review is given against. Nothing a comment is pinned to can move underneath the person reading it, because the snapshot is a commit rather than the worktree.
| Field | Type | Description |
|---|---|---|
id | string | The handle a review or a viewed-file record names this round by. |
agentId | string | Whose work the snapshot was taken of. |
ordinal | int32 | Which round this is for its agent, counting from one. |
baseSha | string | The commit the agent's branch left its base at when the round was taken. |
snapshotSha | string | The commit the whole worktree was written out as, tracked and untracked alike. |
createdAt | string | When the snapshot was taken, in RFC 3339. |
ReviewThreadInContext#
ReviewThreadInContext is one thread of a released review, with the code it was written about drawn from the round's snapshot.
| Field | Type | Description |
|---|---|---|
thread | ReviewThread | The thread as list_review_threads renders it, holding only the messages that went out with this review. |
context | list of 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, in which case the thread's quoted_lines are what there is. |
ReviewThread#
ReviewThread is one conversation pinned to a place in a round of an agent's diff.
| Field | Type | Description |
|---|---|---|
id | string | The handle a reply or a resolve names this thread by. |
agentId | string | Whose diff the thread is pinned to. |
reviewId | string | The batch this thread was opened as part of. |
roundId | string | The round the thread is anchored to, which never moves. |
roundOrdinal | int32 | Which round that is, counting from one. |
baseSha | string | The commit the old side of these line numbers was read against, which is the round's own base unless the diff was narrowed to an earlier round when the thread was written. |
filePath | string | Which file, relative to the checkout. |
oldStart | int32 | Where the range begins on the old side of the diff, counting from one. |
oldEnd | int32 | Where it ends on the old side, inclusive. |
newStart | int32 | Where the range begins on the new side. |
newEnd | int32 | Where it ends on the new side, inclusive. |
quotedLines | list of string | The diff lines the thread was written against, each keeping its leading marker. |
resolvedAt | string | When the person reviewing settled this thread, empty while it is still owed an answer. Whether a thread is settled is a different question from whether the code under it has moved, and it is this one that decides whether the thread is still asking for something. |
unreadByHuman | bool | Whether the agent has replied since the person reviewing last looked. |
messages | list of ReviewMessage | Everything said in the thread, oldest first. |
createdAt | string | When the thread was opened. |
updatedAt | string | When anything in it last moved. |
ReviewMessage#
ReviewMessage is one thing said in a review thread.
| Field | Type | Description |
|---|---|---|
id | string | The handle an edit of this message names it by. |
threadId | string | Which conversation it belongs to. |
authorKind | ReviewAuthorKind | Whether a person or an agent wrote it. |
authorAgentId | string | The agent that wrote it, absent for the person reviewing and cleared if that agent is deleted. author_kind, not this, is what says who wrote it. |
body | string | What the author wrote. |
suggestion | list of string | Replacement lines the author proposes for the thread's range, empty for an ordinary comment. An agent applies these rather than reasoning about them. |
createdAt | string | When it was written. |
updatedAt | string | When it was last edited. |
delivery | ReviewDeliveryState | How far this comment has got towards the agent reading it. |
sentAt | string | When the person reviewing released this comment, empty while it is only written down. |
deliveredAt | string | When the agent claimed the doorbell raised for this comment, empty until it has. |
reviewId | string | The review this message went out with, absent for an answer written by the agent under review, which belongs to no batch. |
ReviewAuthorKind#
ReviewAuthorKind is who wrote a review message.
| Value | Description |
|---|---|
REVIEW_AUTHOR_KIND_HUMAN | The person running komrad. |
REVIEW_AUTHOR_KIND_AGENT | The agent whose work is being read, or the reviewer reading it. |
ReviewVerdict#
ReviewVerdict is what an author concluded about a round, which is what tells the agent whether it is done rather than leaving it to read that out of the prose.
| Value | Description |
|---|---|
REVIEW_VERDICT_APPROVED | This round is good as it stands. |
REVIEW_VERDICT_CHANGES_REQUESTED | The agent should keep working. |
REVIEW_VERDICT_COMMENTED | Notes without a conclusion either way. |
ReviewDeliveryState#
ReviewDeliveryState is how far one of the person's comments has got towards the agent reading it. It is no stored field: it is read off the comment's own sent stamp and the newest doorbell raised against it, since the stamp outlives mail the agent deletes or lets expire. Whether the comment has been answered is a different question, read off the messages of the thread.
| Value | Description |
|---|---|
REVIEW_DELIVERY_STATE_UNSENT | Written down and not yet let go of. |
REVIEW_DELIVERY_STATE_SENT | Released, with a doorbell still waiting to be claimed. |
REVIEW_DELIVERY_STATE_DELIVERED | Released, and the agent has claimed the doorbell. |