# list\_document\_versions

List every write of a document, newest first, saying which the person made.

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

## Calling it

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

```bash
komrad rpc list-document-versions \
  --id '<uuid>'
```

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

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

## Request

### ListDocumentVersionsRequest

| Field | Type | Description |
| --- | --- | --- |
| [`id`](https://komrad.dev/latest/api/agent/list-document-versions.md#komrad-agent-v1-ListDocumentVersionsRequest-id) | uuid\* | The document whose versions to list, by id. |

## Response

### ListDocumentVersionsResponse

| Field | Type | Description |
| --- | --- | --- |
| [`versions`](https://komrad.dev/latest/api/agent/list-document-versions.md#komrad-agent-v1-ListDocumentVersionsResponse-versions) | [DocumentVersion\[\]](https://komrad.dev/latest/api/agent/list-document-versions.md#komrad-agent-v1-DocumentVersion) | Every version of the document, newest first. |

## Types

### DocumentVersion

DocumentVersion is one write of a document, without its text.

| Field | Type | Description |
| --- | --- | --- |
| [`version`](https://komrad.dev/latest/api/agent/list-document-versions.md#komrad-agent-v1-DocumentVersion-version) | int32 | The version's number, to pass to [`get_document`](https://komrad.dev/latest/api/agent/get-document.md). |
| [`name`](https://komrad.dev/latest/api/agent/list-document-versions.md#komrad-agent-v1-DocumentVersion-name) | string | The document's title at this version. |
| [`type`](https://komrad.dev/latest/api/agent/list-document-versions.md#komrad-agent-v1-DocumentVersion-type) | string | The name of the document's type at this version. |
| [`by_person`](https://komrad.dev/latest/api/agent/list-document-versions.md#komrad-agent-v1-DocumentVersion-by_person) | bool | Whether the person wrote this version, rather than the agent that owns the document. |
| [`created_at`](https://komrad.dev/latest/api/agent/list-document-versions.md#komrad-agent-v1-DocumentVersion-created_at) | timestamp | When this version was written. |
