# Get file

Tool: `veryfront__get_file`

Return a file. Requires project.files.read.

## Arguments

| Name                | Type   | Required | Description                                                                                                           |
| ------------------- | ------ | -------- | --------------------------------------------------------------------------------------------------------------------- |
| `project_reference` | string |          | Project ID or slug (defaults to the current project)                                                                  |
| `ref`               | string |          | Content selector: main, branch:<name-or-id>, release:<version>, or env:<name>. Omit for main.                         |
| `branch`            | string |          | Branch name or ID; alias for ref=branch:<value>.                                                                      |
| `branch_id`         | string |          | Legacy branch name or ID alias. Conflicting selectors are rejected.                                                   |
| `file_path`         | string |          | Path of the file. Send file\_path or path, not two different values.                                                  |
| `path`              | string |          | File path (e.g., pages/index.mdx). Read files matched by search\_knowledge before answering Knowledge Q\&A questions. |

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

## Example response

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "content": [
      {
        "type": "text",
        "text": "{\"binary\":{\"content_hash\":\"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\",\"byte_size\":0,\"content_type\":\"x\"},\"path\":\"string\",\"type\":\"string\",\"content\":\"string\",\"size\":0,\"version_id\":\"string\",\"checksum\":\"string\",\"id\":\"string\",\"size_bytes\":0,\"updated_at\":\"string\"}"
      }
    ],
    "structuredContent": {
      "binary": {
        "content_hash": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
        "byte_size": 0,
        "content_type": "x"
      },
      "path": "string",
      "type": "string",
      "content": "string",
      "size": 0,
      "version_id": "string",
      "checksum": "string",
      "id": "string",
      "size_bytes": 0,
      "updated_at": "string"
    }
  }
}
```
