# List files

Tool: `veryfront__list_files`

List the files. Requires project.files.read.

## Arguments

| Name                | Type                         | Required | Description                                                                                                                                               |
| ------------------- | ---------------------------- | -------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `project_reference` | string                       |          | Project ID or slug                                                                                                                                        |
| `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.                                                                                       |
| `pattern`           | string · max length 1024     |          | File pattern filter (e.g., *.tsx, pages/*)                                                                                                                |
| `cursor`            | string                       |          | Opaque page\_info.next cursor from the preceding page. Returns a validation error if its file was deleted, renamed, or excluded from the current results. |
| `limit`             | integer · min 1 · max 100    |          | Max files to return (default: 100, max: 100)                                                                                                              |
| `sort_by`           | string · default updated\_at |          | Sort by path or last update time (default updated\_at). One of `path`, `updated_at`.                                                                      |
| `sort_order`        | string · default desc        |          | Sort direction (default desc). Tied update times break by path ascending. One of `asc`, `desc`.                                                           |

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

## Example response

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