# Create branch

Tool: `veryfront__create_branch`

Create a branch from the project root or from another branch, snapshotting its files. Requires project.files.write.

## Arguments

| Name                   | Type                                   | Required | Description                                                                                                                                                                                       |
| ---------------------- | -------------------------------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `name`                 | string · min length 1 · max length 255 | Yes      | Branch name (e.g., "feature-new-header"). Branch name may only contain letters, numbers, ".", "\_", "/" and "-", and cannot start with "-".                                                       |
| `base_branch_id`       | string · uuid \| null                  |          | Omit to branch from the project root (created automatically if missing). Use null to create a root branch; rejected if a root already exists. A UUID must identify a base branch in this project. |
| `description`          | string                                 |          | Branch description.                                                                                                                                                                               |
| `auto_delete_on_merge` | boolean                                |          | Delete the branch after it merges (default: false).                                                                                                                                               |
| `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__create_branch",
    "arguments": {
      "name": "A"
    }
  }
}'
```

## Example response

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "content": [
      {
        "type": "text",
        "text": "{\"id\":\"string\",\"name\":\"string\",\"project_id\":\"string\"}"
      }
    ],
    "structuredContent": {
      "id": "string",
      "name": "string",
      "project_id": "string"
    }
  }
}
```
