# veryfront__merge_branch

Merge a branch into main or another branch, applying its file changes, deletions and the merge message to the target. Requires project.files.write.

Risk: mutating.

## Arguments

| Name               | Type    | Required | Description                                                                                                                                     |
| ------------------ | ------- | -------- | ----------------------------------------------------------------------------------------------------------------------------------------------- |
| `branch_id`        | string  | Yes      | Branch ID to merge                                                                                                                              |
| `expected_version` | integer |          | Expected source branch version. Stale versions return a precondition failure before any merge writes.                                           |
| `target_branch_id` |         |          | Target branch ID; omit for main. An unknown target returns not found. Merge eligibility and conflicts are checked again when the merge commits. |
| `merge_message`    | string  |          | Optional message describing the merge                                                                                                           |

## Call it

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "veryfront__merge_branch",
    "arguments": {
      "branch_id": "<branch_id>"
    }
  }
}
```
