# List branches

Tool: `veryfront__list_branches`

List the branches of a project, including its root branch. Requires project.read.

## Arguments

| Name                | Type                                    | Required | Description                                                                                      |
| ------------------- | --------------------------------------- | -------- | ------------------------------------------------------------------------------------------------ |
| `limit`             | integer · min 1 · max 100               |          | Page size 1–100. Omit limit and cursor for the complete collection; cursor alone defaults to 20. |
| `cursor`            | string · min length 1 · max length 4096 |          | Opaque continuation bound to collection, project, branch, principal, filters and page size.      |
| `search`            | string                                  |          | Case-insensitive partial branch-name match.                                                      |
| `status`            | string · default all                    |          | Branch status filter; defaults to all. One of `active`, `merged`, `closed`, `all`.               |
| `project_reference` | string                                  |          | 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__list_branches",
    "arguments": {}
  }
}'
```

## Example response

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "content": [
      {
        "type": "text",
        "text": "{\"branches\":[{\"id\":\"string\",\"name\":\"string\",\"project_id\":\"string\",\"base_branch_id\":\"string\",\"created_at\":\"string\",\"created_by\":\"string\",\"merged_at\":\"string\",\"merged_by\":\"string\",\"version\":0,\"status\":\"active\",\"description\":\"string\",\"auto_delete_on_merge\":false}],\"page_info\":{\"self\":\"string\",\"first\":null,\"next\":\"string\",\"prev\":\"string\"}}"
      }
    ],
    "structuredContent": {
      "branches": [
        {
          "id": "string",
          "name": "string",
          "project_id": "string",
          "base_branch_id": "string",
          "created_at": "string",
          "created_by": "string",
          "merged_at": "string",
          "merged_by": "string",
          "version": 0,
          "status": "active",
          "description": "string",
          "auto_delete_on_merge": false
        }
      ],
      "page_info": {
        "self": "string",
        "first": null,
        "next": "string",
        "prev": "string"
      }
    }
  }
}
```
