Check branch merge eligibility

veryfront__check_branch_merge_eligibility

Requires project.read.

Access

No external-service connection is required. Use a Veryfront credential with access to the requested resources.

Call type: Read-only.

Arguments

FieldTypeRequiredDescription and constraints
branch_idstringYesBranch to check. A missing branch and one you cannot read are both not found. Format: uuid.

Example request

Send this JSON-RPC request through an initialized MCP client. Replace sample identifiers and values before calling the tool. See MCP client setup.

json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "veryfront__check_branch_merge_eligibility",
    "arguments": {
      "branch_id": "00000000-0000-4000-8000-000000000000"
    }
  }
}

Result

The published output shape is summarized below. Inspect both the MCP response content and isError when handling a call.

FieldTypeRequiredDescription and constraints
can_mergebooleanYesWhether policies, approvals and status checks allow the merge now.
applicable_policiesobject[]YesEnabled policies that match the branch.
approvalsobject[]YesApprovals that still count.
status_checksobject[]YesStatus checks reported for the branch.
blockersobject[]YesReasons the branch cannot merge; empty when it can.

Full schemas

json
{
  "type": "object",
  "properties": {
    "branch_id": {
      "type": "string",
      "format": "uuid",
      "description": "Branch to check. A missing branch and one you cannot read are both not found."
    }
  },
  "required": [
    "branch_id"
  ],
  "additionalProperties": false,
  "description": "Use this before merge_branch to learn whether policies, approvals and status checks allow the merge now. Returns can_merge, the applicable policies, the approvals that count, the status checks and one blocker per reason; can_merge false is a result, not an error.",
  "$schema": "http://json-schema.org/draft-07/schema#"
}
json
{
  "type": "object",
  "properties": {
    "can_merge": {
      "type": "boolean",
      "description": "Whether policies, approvals and status checks allow the merge now."
    },
    "applicable_policies": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Policy ID."
          },
          "project_id": {
            "type": "string",
            "format": "uuid",
            "description": "Project that owns the policy."
          },
          "name": {
            "type": "string",
            "description": "Policy name."
          },
          "is_enabled": {
            "type": "boolean",
            "description": "Whether the policy is evaluated on merge."
          },
          "target_branch_pattern": {
            "type": [
              "string",
              "null"
            ],
            "description": "Branch-name pattern the policy applies to; null applies to every branch."
          },
          "required_approvals": {
            "type": "integer",
            "minimum": 0,
            "description": "Approvals a matching branch needs before it can merge."
          },
          "allow_self_approval": {
            "type": "boolean",
            "description": "Whether the merging user's own approval counts."
          },
          "required_reviewer_ids": {
            "anyOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "List of required reviewer ids associated with this tool result."
              },
              {
                "type": "null",
                "description": "The required reviewer ids returned by the tool."
              }
            ],
            "description": "Users who must approve; null when the policy was created without reviewers."
          },
          "created_at": {
            "type": "string",
            "description": "Creation time."
          },
          "updated_at": {
            "type": "string",
            "description": "Last update time."
          }
        },
        "required": [
          "id",
          "project_id",
          "name",
          "is_enabled",
          "target_branch_pattern",
          "required_approvals",
          "allow_self_approval",
          "required_reviewer_ids",
          "created_at",
          "updated_at"
        ],
        "additionalProperties": false
      },
      "description": "Enabled policies that match the branch."
    },
    "approvals": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Approval ID."
          },
          "branch_id": {
            "type": "string",
            "format": "uuid",
            "description": "Approved branch."
          },
          "approved_by": {
            "type": "string",
            "format": "uuid",
            "description": "User who approved."
          },
          "approved_at": {
            "type": "string",
            "description": "Approval time; kept after dismissal."
          },
          "comment": {
            "type": [
              "string",
              "null"
            ],
            "description": "Approval comment, or null."
          },
          "dismissed_at": {
            "type": [
              "string",
              "null"
            ],
            "description": "Dismissal time, or null while the approval counts."
          },
          "dismissed_by": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null",
                "description": "The dismissed by returned by the tool."
              }
            ],
            "description": "User who dismissed the approval, or null."
          },
          "dismissed_reason": {
            "type": [
              "string",
              "null"
            ],
            "description": "Dismissal reason, or null."
          }
        },
        "required": [
          "id",
          "branch_id",
          "approved_by",
          "approved_at",
          "comment",
          "dismissed_at",
          "dismissed_by",
          "dismissed_reason"
        ],
        "additionalProperties": false
      },
      "description": "Approvals that still count."
    },
    "status_checks": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Status check ID."
          },
          "branch_id": {
            "type": "string",
            "format": "uuid",
            "description": "Branch the check reports on."
          },
          "check_name": {
            "type": "string",
            "description": "Check name; the key of the check on its branch."
          },
          "status": {
            "type": "string",
            "enum": [
              "pending",
              "success",
              "failure"
            ],
            "description": "Reported state."
          },
          "description": {
            "type": [
              "string",
              "null"
            ],
            "description": "Result description, or null."
          },
          "external_url": {
            "type": [
              "string",
              "null"
            ],
            "description": "Link to the external result, or null."
          },
          "started_at": {
            "type": [
              "string",
              "null"
            ],
            "description": "Start time, or null when unavailable."
          },
          "completed_at": {
            "type": [
              "string",
              "null"
            ],
            "description": "Completion time, or null while pending."
          },
          "created_at": {
            "type": "string",
            "description": "Creation time."
          },
          "updated_at": {
            "type": "string",
            "description": "Last update time."
          }
        },
        "required": [
          "id",
          "branch_id",
          "check_name",
          "status",
          "description",
          "external_url",
          "started_at",
          "completed_at",
          "created_at",
          "updated_at"
        ],
        "additionalProperties": false
      },
      "description": "Status checks reported for the branch."
    },
    "blockers": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "approval_required",
              "status_check_failed",
              "status_check_pending",
              "self_approval_not_allowed",
              "required_reviewer_missing"
            ],
            "description": "Kind of blocker."
          },
          "message": {
            "type": "string",
            "description": "Reader-facing reason."
          },
          "details": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "policy_id": {
                    "anyOf": [
                      {
                        "$ref": "#/properties/approvals/items/properties/dismissed_by/anyOf/0",
                        "description": "The policy id returned by the tool."
                      },
                      {
                        "type": "null",
                        "description": "The policy id returned by the tool."
                      }
                    ],
                    "description": "Policy that blocks the merge, or null."
                  },
                  "required_approvals": {
                    "anyOf": [
                      {
                        "type": "integer"
                      },
                      {
                        "type": "null",
                        "description": "The required approvals returned by the tool."
                      }
                    ],
                    "description": "Approvals the policy requires, or null."
                  },
                  "approval_count": {
                    "anyOf": [
                      {
                        "type": "integer"
                      },
                      {
                        "type": "null",
                        "description": "The approval count returned by the tool."
                      }
                    ],
                    "description": "Approvals that count toward the policy, or null."
                  },
                  "missing_reviewer_ids": {
                    "anyOf": [
                      {
                        "type": "array",
                        "items": {
                          "type": "string"
                        },
                        "description": "List of missing reviewer ids associated with this tool result."
                      },
                      {
                        "type": "null",
                        "description": "The missing reviewer ids returned by the tool."
                      }
                    ],
                    "description": "Required reviewers who have not approved, or null."
                  },
                  "failed_checks": {
                    "anyOf": [
                      {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "name": {
                              "type": "string",
                              "description": "Check name."
                            },
                            "description": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "description": "Result description, or null."
                            }
                          },
                          "required": [
                            "name",
                            "description"
                          ],
                          "additionalProperties": false
                        },
                        "description": "List of failed checks associated with this tool result."
                      },
                      {
                        "type": "null",
                        "description": "The failed checks returned by the tool."
                      }
                    ],
                    "description": "Failed status checks, or null."
                  },
                  "pending_checks": {
                    "anyOf": [
                      {
                        "type": "array",
                        "items": {
                          "$ref": "#/properties/blockers/items/properties/details/anyOf/0/properties/failed_checks/anyOf/0/items",
                          "description": "One pending check item returned by the tool."
                        },
                        "description": "List of pending checks associated with this tool result."
                      },
                      {
                        "type": "null",
                        "description": "The pending checks returned by the tool."
                      }
                    ],
                    "description": "Pending status checks, or null."
                  }
                },
                "required": [
                  "policy_id",
                  "required_approvals",
                  "approval_count",
                  "missing_reviewer_ids",
                  "failed_checks",
                  "pending_checks"
                ],
                "additionalProperties": false,
                "description": "Structured details details associated with this tool result."
              },
              {
                "type": "null",
                "description": "The details returned by the tool."
              }
            ],
            "description": "Facts behind the blocker, or null."
          }
        },
        "required": [
          "type",
          "message",
          "details"
        ],
        "additionalProperties": false
      },
      "description": "Reasons the branch cannot merge; empty when it can."
    }
  },
  "required": [
    "can_merge",
    "applicable_policies",
    "approvals",
    "status_checks",
    "blockers"
  ],
  "additionalProperties": false,
  "description": "Structured result returned by the check_branch_merge_eligibility tool.",
  "$schema": "http://json-schema.org/draft-07/schema#"
}