# Get branch merge preview

Tool: `veryfront__get_branch_merge_preview`

Show the file-by-file changes a merge would apply, with conflict regions and contents. Requires project.read.

## Arguments

| Name               | Type                  | Required | Description                                                                   |
| ------------------ | --------------------- | -------- | ----------------------------------------------------------------------------- |
| `target_branch_id` | string · uuid \| null |          | Target branch ID; omit for main.                                              |
| `branch_id`        | string · uuid         | Yes      | Branch to merge. A missing branch and one you cannot read are both not found. |

## 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_branch_merge_preview",
    "arguments": {
      "branch_id": "00000000-0000-0000-0000-000000000000"
    }
  }
}'
```

## Example response

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "content": [
      {
        "type": "text",
        "text": "{\"source_branch\":{\"id\":\"00000000-0000-0000-0000-000000000000\",\"name\":\"string\",\"project_id\":\"00000000-0000-0000-0000-000000000000\",\"base_branch_id\":\"00000000-0000-0000-0000-000000000000\",\"status\":\"active\",\"description\":\"string\",\"auto_delete_on_merge\":false,\"version\":0,\"created_at\":\"string\",\"created_by\":\"00000000-0000-0000-0000-000000000000\",\"updated_at\":\"string\",\"merged_at\":\"string\",\"merged_by\":\"00000000-0000-0000-0000-000000000000\"},\"target_branch_id\":\"00000000-0000-0000-0000-000000000000\",\"target_branch_name\":\"string\",\"can_merge\":false,\"blocked_reason\":\"string\",\"has_conflicts\":false,\"diffs\":[{\"file_path\":\"string\",\"file_type\":\"string\",\"file_id\":\"string\",\"has_conflicts\":false,\"conflict_count\":0,\"conflict_regions\":[{\"id\":\"string\",\"type\":\"conflict\",\"base_start\":0,\"base_end\":0,\"target_start\":0,\"target_end\":0,\"source_start\":0,\"source_end\":0,\"base_lines\":\"string\",\"target_lines\":\"string\",\"source_lines\":\"string\"}],\"is_new\":false,\"is_deleted\":false,\"is_modified\":false,\"base_changed\":false,\"branch_changed\":false,\"base_content\":\"string\",\"target_content\":\"string\",\"source_content\":\"string\"}]}"
      }
    ],
    "structuredContent": {
      "source_branch": {
        "id": "00000000-0000-0000-0000-000000000000",
        "name": "string",
        "project_id": "00000000-0000-0000-0000-000000000000",
        "base_branch_id": "00000000-0000-0000-0000-000000000000",
        "status": "active",
        "description": "string",
        "auto_delete_on_merge": false,
        "version": 0,
        "created_at": "string",
        "created_by": "00000000-0000-0000-0000-000000000000",
        "updated_at": "string",
        "merged_at": "string",
        "merged_by": "00000000-0000-0000-0000-000000000000"
      },
      "target_branch_id": "00000000-0000-0000-0000-000000000000",
      "target_branch_name": "string",
      "can_merge": false,
      "blocked_reason": "string",
      "has_conflicts": false,
      "diffs": [
        {
          "file_path": "string",
          "file_type": "string",
          "file_id": "string",
          "has_conflicts": false,
          "conflict_count": 0,
          "conflict_regions": [
            {
              "id": "string",
              "type": "conflict",
              "base_start": 0,
              "base_end": 0,
              "target_start": 0,
              "target_end": 0,
              "source_start": 0,
              "source_end": 0,
              "base_lines": "string",
              "target_lines": "string",
              "source_lines": "string"
            }
          ],
          "is_new": false,
          "is_deleted": false,
          "is_modified": false,
          "base_changed": false,
          "branch_changed": false,
          "base_content": "string",
          "target_content": "string",
          "source_content": "string"
        }
      ]
    }
  }
}
```
