# Create a retrieval document

Tool: `veryfront__create_retrieval_document`

Create 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.                                                                                                    |
| `id`                | string · uuid         |          | Caller-chosen record ID. Omit to let the API choose one. An ID that already exists is a conflict. Create the record before writing its chunks; use update to change an existing record. |
| `project_reference` | string · min length 1 |          | Project ID or slug.                                                                                                                                                                     |

## 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__create_retrieval_document",
    "arguments": {
      "title": "string"
    }
  }
}'
```

## 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"
    }
  }
}
```
