# Search files

Tool: `veryfront__search_files`

Search files by vector. Requires project.knowledge.read.

## Arguments

| Name                | Type                     | Required | Description                                                                                                                                                                               |
| ------------------- | ------------------------ | -------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `project_reference` | string                   |          | Project ID or slug whose indexed file chunks should be searched.                                                                                                                          |
| `model`             | object                   |          | AI model id or alias. Call list\_models for the ids this deployment serves; never invent a version suffix.                                                                                |
| `query_vector`      | array of number          | Yes      | Embedding vector for the search query, generated with a compatible embedding model.                                                                                                       |
| `dimension`         | string                   | Yes      | Embedding dimension that matches the supplied query vector. One of `768`, `1024`, `1536`, `3072`, `4096`.                                                                                 |
| `mode`              | string                   |          | Search mode. Only SEMANTIC (the default) is supported; KEYWORD and HYBRID are refused. One of `SEMANTIC`, `KEYWORD`, `HYBRID`.                                                            |
| `environment`       | string                   |          | Index to search: the preview branch, the production deployment or a release. One of `PREVIEW`, `PRODUCTION`, `RELEASE`.                                                                   |
| `branch_id`         | string · uuid \| null    |          | Preview branch ID to search. Use null for the main branch.                                                                                                                                |
| `release_id`        | string · uuid            |          | Release ID to search instead of the current branch or mainline index.                                                                                                                     |
| `release_version`   | string                   |          | Release version to search when you do not have the release ID.                                                                                                                            |
| `limit`             | number · min 1 · max 100 |          | Maximum number of ranked chunk matches to return, as an integer from 1 to 100.                                                                                                            |
| `cursor`            | string                   |          | Opaque pagination cursor from a previous response.                                                                                                                                        |
| `options`           | object                   |          | Search options. Tool results carry no embedding vectors, so include\_embeddings has no effect here. Non-empty folders or file\_types are refused: the search does not filter by them yet. |

## 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__search_files",
    "arguments": {
      "query_vector": [],
      "dimension": "768"
    }
  }
}'
```

## Example response

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "content": [
      {
        "type": "text",
        "text": "{\"data\":[{\"chunk\":{\"id\":\"string\",\"file_path\":\"string\",\"file_id\":\"string\",\"file_version_id\":\"string\",\"index\":0,\"content\":\"string\",\"start_offset\":0,\"end_offset\":0,\"token_count\":0,\"embedding\":{\"id\":\"string\",\"model\":\"string\",\"status\":\"ready\"},\"embedding_included\":false},\"score\":0}],\"page_info\":{\"self\":\"string\",\"first\":{},\"next\":\"string\",\"prev\":\"string\"},\"total_matches\":0,\"search_time_ms\":0}"
      }
    ],
    "structuredContent": {
      "data": [
        {
          "chunk": {
            "id": "string",
            "file_path": "string",
            "file_id": "string",
            "file_version_id": "string",
            "index": 0,
            "content": "string",
            "start_offset": 0,
            "end_offset": 0,
            "token_count": 0,
            "embedding": {
              "id": "string",
              "model": "string",
              "status": "ready"
            },
            "embedding_included": false
          },
          "score": 0
        }
      ],
      "page_info": {
        "self": "string",
        "first": {},
        "next": "string",
        "prev": "string"
      },
      "total_matches": 0,
      "search_time_ms": 0
    }
  }
}
```
