# add\_review\_message

Reply in a thread on the caller's own diff.

writes · not idempotent · MCP tool · [Agent](https://komrad.dev/latest/api/agent.md)

With [`addressed`](https://komrad.dev/latest/api/agent/add-review-message.md#komrad-agent-v1-AddReviewMessageRequest-addressed) set, the reply pins a new snapshot of the worktree. The reply leaves the thread open. Komrad refuses [`addressed`](https://komrad.dev/latest/api/agent/add-review-message.md#komrad-agent-v1-AddReviewMessageRequest-addressed) when the worktree has not changed since the thread's snapshot.

## Calling it

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

```bash
komrad rpc add-review-message \
  --thread-id '<uuid>' \
  --body '<string>'
```

```json
{
  "name": "add_review_message",
  "arguments": {
    "thread_id": "<thread_id>",
    "body": "<body>"
  }
}
```

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

## Request

### AddReviewMessageRequest

| Field | Type | Description |
| --- | --- | --- |
| [`thread_id`](https://komrad.dev/latest/api/agent/add-review-message.md#komrad-agent-v1-AddReviewMessageRequest-thread_id) | uuid\* | The thread to reply in, by id. |
| [`body`](https://komrad.dev/latest/api/agent/add-review-message.md#komrad-agent-v1-AddReviewMessageRequest-body) | string\* at most 1000 characters | The reply's text. |
| [`suggestion`](https://komrad.dev/latest/api/agent/add-review-message.md#komrad-agent-v1-AddReviewMessageRequest-suggestion) | string\[\] | The lines proposed in place of the thread's range. Empty for a plain reply. |
| [`addressed`](https://komrad.dev/latest/api/agent/add-review-message.md#komrad-agent-v1-AddReviewMessageRequest-addressed) | bool | Whether the reply says the change the thread asks for is made. Komrad then saves a snapshot of the worktree and pins it to the reply. |

## Response

### AddReviewMessageResponse

| Field | Type | Description |
| --- | --- | --- |
| [`message`](https://komrad.dev/latest/api/agent/add-review-message.md#komrad-agent-v1-AddReviewMessageResponse-message) | [ReviewMessage](https://komrad.dev/latest/api/agent/add-review-message.md#komrad-agent-v1-ReviewMessage) | The comment as written. |
| [`hint`](https://komrad.dev/latest/api/agent/add-review-message.md#komrad-agent-v1-AddReviewMessageResponse-hint) | string | A reminder to set `addressed`, given when a plain reply goes on a thread whose worktree has changed since the thread was created. Empty otherwise. |

## Types

### ReviewMessage

ReviewMessage is one comment in a review thread.

| Field | Type | Description |
| --- | --- | --- |
| [`id`](https://komrad.dev/latest/api/agent/add-review-message.md#komrad-agent-v1-ReviewMessage-id) | uuid\* | The comment's id. |
| [`thread_id`](https://komrad.dev/latest/api/agent/add-review-message.md#komrad-agent-v1-ReviewMessage-thread_id) | uuid\* | The id of the comment's thread. |
| [`author_kind`](https://komrad.dev/latest/api/agent/add-review-message.md#komrad-agent-v1-ReviewMessage-author_kind) | [ReviewAuthorKind](https://komrad.dev/latest/api/agent/add-review-message.md#komrad-agent-v1-ReviewAuthorKind) | Who wrote the comment. |
| [`author_agent_id`](https://komrad.dev/latest/api/agent/add-review-message.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/add-review-message.md#komrad-agent-v1-ReviewMessage-body) | string | The comment's text. |
| [`suggestion`](https://komrad.dev/latest/api/agent/add-review-message.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/add-review-message.md#komrad-agent-v1-ReviewMessage-created_at) | timestamp | When the comment was written. |
| [`updated_at`](https://komrad.dev/latest/api/agent/add-review-message.md#komrad-agent-v1-ReviewMessage-updated_at) | timestamp | When the comment was last edited. |
| [`review_id`](https://komrad.dev/latest/api/agent/add-review-message.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/add-review-message.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/add-review-message.md#komrad-agent-v1-ReviewMessage-forge) | [ForgeOrigin](https://komrad.dev/latest/api/agent/add-review-message.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/add-review-message.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/add-review-message.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/add-review-message.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/add-review-message.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/add-review-message.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. |

### ForgeOrigin

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

| Field | Type | Description |
| --- | --- | --- |
| [`login`](https://komrad.dev/latest/api/agent/add-review-message.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/add-review-message.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/add-review-message.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/add-review-message.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/add-review-message.md#komrad-agent-v1-ReviewAuthorKind-human) | The person. |
| [`agent`](https://komrad.dev/latest/api/agent/add-review-message.md#komrad-agent-v1-ReviewAuthorKind-agent) | An agent, either the writer or a reviewer. |
| [`forge`](https://komrad.dev/latest/api/agent/add-review-message.md#komrad-agent-v1-ReviewAuthorKind-forge) | A forge user, whose comment komrad copied from the pull request. |
