# Check branch merge eligibility

Tool: `veryfront__check_branch_merge_eligibility`

Check policies, approvals and status checks to say whether a branch can merge now. Requires project.read.

## Arguments

| Name        | Type          | Required | Description                                                                   |
| ----------- | ------------- | -------- | ----------------------------------------------------------------------------- |
| `branch_id` | string · uuid | Yes      | Branch to check. 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__check_branch_merge_eligibility",
    "arguments": {
      "branch_id": "00000000-0000-0000-0000-000000000000"
    }
  }
}'
```

## Example response

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "content": [
      {
        "type": "text",
        "text": "{\"can_merge\":false,\"applicable_policies\":[{\"id\":\"00000000-0000-0000-0000-000000000000\",\"project_id\":\"00000000-0000-0000-0000-000000000000\",\"name\":\"string\",\"is_enabled\":false,\"target_branch_pattern\":\"string\",\"required_approvals\":0,\"allow_self_approval\":false,\"required_reviewer_ids\":[\"string\"],\"created_at\":\"string\",\"updated_at\":\"string\"}],\"approvals\":[{\"id\":\"00000000-0000-0000-0000-000000000000\",\"branch_id\":\"00000000-0000-0000-0000-000000000000\",\"approved_by\":\"00000000-0000-0000-0000-000000000000\",\"approved_at\":\"string\",\"comment\":\"string\",\"dismissed_at\":\"string\",\"dismissed_by\":\"00000000-0000-0000-0000-000000000000\",\"dismissed_reason\":\"string\"}],\"status_checks\":[{\"id\":\"00000000-0000-0000-0000-000000000000\",\"branch_id\":\"00000000-0000-0000-0000-000000000000\",\"check_name\":\"string\",\"status\":\"pending\",\"description\":\"string\",\"external_url\":\"string\",\"started_at\":\"string\",\"completed_at\":\"string\",\"created_at\":\"string\",\"updated_at\":\"string\"}],\"blockers\":[{\"type\":\"approval_required\",\"message\":\"string\",\"details\":{\"policy_id\":\"00000000-0000-0000-0000-000000000000\",\"required_approvals\":0,\"approval_count\":0,\"missing_reviewer_ids\":[\"string\"],\"failed_checks\":[{\"name\":\"string\",\"description\":\"string\"}],\"pending_checks\":[{\"name\":\"string\",\"description\":\"string\"}]}}]}"
      }
    ],
    "structuredContent": {
      "can_merge": false,
      "applicable_policies": [
        {
          "id": "00000000-0000-0000-0000-000000000000",
          "project_id": "00000000-0000-0000-0000-000000000000",
          "name": "string",
          "is_enabled": false,
          "target_branch_pattern": "string",
          "required_approvals": 0,
          "allow_self_approval": false,
          "required_reviewer_ids": [
            "string"
          ],
          "created_at": "string",
          "updated_at": "string"
        }
      ],
      "approvals": [
        {
          "id": "00000000-0000-0000-0000-000000000000",
          "branch_id": "00000000-0000-0000-0000-000000000000",
          "approved_by": "00000000-0000-0000-0000-000000000000",
          "approved_at": "string",
          "comment": "string",
          "dismissed_at": "string",
          "dismissed_by": "00000000-0000-0000-0000-000000000000",
          "dismissed_reason": "string"
        }
      ],
      "status_checks": [
        {
          "id": "00000000-0000-0000-0000-000000000000",
          "branch_id": "00000000-0000-0000-0000-000000000000",
          "check_name": "string",
          "status": "pending",
          "description": "string",
          "external_url": "string",
          "started_at": "string",
          "completed_at": "string",
          "created_at": "string",
          "updated_at": "string"
        }
      ],
      "blockers": [
        {
          "type": "approval_required",
          "message": "string",
          "details": {
            "policy_id": "00000000-0000-0000-0000-000000000000",
            "required_approvals": 0,
            "approval_count": 0,
            "missing_reviewer_ids": [
              "string"
            ],
            "failed_checks": [
              {
                "name": "string",
                "description": "string"
              }
            ],
            "pending_checks": [
              {
                "name": "string",
                "description": "string"
              }
            ]
          }
        }
      ]
    }
  }
}
```
