# Update a retrieval document

Tool: `veryfront__update_retrieval_document`

Update retrieval document. Requires project.knowledge.write.

## Arguments

| Name                    | Type                  | Required | Description                                                                                                                                                                       |
| ----------------------- | --------------------- | -------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `title`                 | string · min length 1 | Yes      | Document title, at least one character.                                                                                                                                           |
| `source`                | string                |          | Upstream source reference, such as a file path or URL. Defaults to "".                                                                                                            |
| `type`                  | string                |          | Document type label. Defaults to "".                                                                                                                                              |
| `metadata`              | object                |          | Structured metadata stored with the record: an object of string keys to JSON values.                                                                                              |
| `expected_revision`     | string                | Yes      | The revision you read. A changed record is a conflict; a missing record is not\_found. Title, source, type and metadata are replaced, and the response includes the new revision. |
| `project_reference`     | string · min length 1 |          | Project ID or slug.                                                                                                                                                               |
| `retrieval_document_id` | string · uuid         | Yes      | Retrieval document ID.                                                                                                                                                            |

## Responses

| Status | Description                                           |
| ------ | ----------------------------------------------------- |
| 200    | The tool ran; its output is result.structuredContent. |

## Call it

```bash
curl -X POST -N "https://api.veryfront.com/mcp" \
  -H "Authorization: Bearer $VERYFRONT_API_KEY" \
  -H "Accept: application/json, text/event-stream" \
  -H "Content-Type: application/json" \
  -d '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "veryfront__update_retrieval_document",
    "arguments": {
      "title": "string",
      "expected_revision": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
      "retrieval_document_id": "00000000-0000-0000-0000-000000000000"
    }
  }
}'
```

## Example response

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "content": [
      {
        "type": "text",
        "text": "{\"id\":\"00000000-0000-0000-0000-000000000000\",\"revision\":\"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\",\"title\":\"string\",\"source\":\"string\",\"type\":\"string\",\"metadata\":{},\"created_at\":\"2026-01-01T00:00:00Z\",\"updated_at\":\"2026-01-01T00:00:00Z\"}"
      }
    ],
    "structuredContent": {
      "id": "00000000-0000-0000-0000-000000000000",
      "revision": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
      "title": "string",
      "source": "string",
      "type": "string",
      "metadata": {},
      "created_at": "2026-01-01T00:00:00Z",
      "updated_at": "2026-01-01T00:00:00Z"
    }
  }
}
```
