Skip to main content
List branch policies for a project. Policies enforce merge requirements like approvals.

Tool details

FieldValue
Namelist_branch_policies
GroupBranches

Playground

Input schema

Input schema
{
  "type": "object",
  "properties": {
    "project_reference": {
      "type": "string",
      "description": "Project ID or slug"
    },
    "enabled_only": {
      "type": "boolean",
      "description": "Only return enabled policies"
    }
  },
  "required": [
    "project_reference"
  ],
  "additionalProperties": false,
  "description": "Input schema for the list_branch_policies tool.",
  "$schema": "http://json-schema.org/draft-07/schema#"
}

Output schema

Output schema
{
  "type": "object",
  "properties": {
    "policies": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Unique identifier for the record."
          },
          "name": {
            "type": "string",
            "description": "Human-readable name for the record."
          },
          "is_enabled": {
            "type": "boolean",
            "description": "The is enabled associated with this record."
          },
          "required_approvals": {
            "type": "number",
            "description": "The required approvals associated with this record."
          },
          "allow_self_approval": {
            "type": "boolean",
            "description": "The allow self approval associated with this record."
          },
          "target_branch_pattern": {
            "type": [
              "string",
              "null"
            ],
            "description": "The target branch pattern associated with this record."
          }
        },
        "required": [
          "id",
          "name",
          "is_enabled",
          "required_approvals",
          "allow_self_approval",
          "target_branch_pattern"
        ],
        "additionalProperties": false,
        "description": "One policy item associated with this record."
      },
      "description": "List of policies associated with this record."
    }
  },
  "required": [
    "policies"
  ],
  "additionalProperties": false,
  "description": "Structured list policies output schema for MCP tools.",
  "$schema": "http://json-schema.org/draft-07/schema#"
}