Skip to main content
Create a branch policy to enforce merge requirements (4-eyes principle, required approvals).

Tool details

FieldValue
Namecreate_branch_policy
GroupBranches

Playground

Input schema

Input schema
{
  "type": "object",
  "properties": {
    "project_reference": {
      "type": "string",
      "description": "Project ID or slug"
    },
    "name": {
      "type": "string",
      "description": "Policy name"
    },
    "required_approvals": {
      "type": "number",
      "description": "Number of approvals required (default: 1)"
    },
    "allow_self_approval": {
      "type": "boolean",
      "description": "Allow the merger to also approve (default: false)"
    },
    "target_branch_pattern": {
      "type": "string",
      "description": "Pattern to match branches (e.g., \"main\", \"release/*\")"
    }
  },
  "required": [
    "project_reference",
    "name"
  ],
  "additionalProperties": false,
  "description": "Input schema for the create_branch_policy tool.",
  "$schema": "http://json-schema.org/draft-07/schema#"
}

Output schema

Output schema
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Unique identifier for the record."
    },
    "name": {
      "type": "string",
      "description": "Human-readable name for the record."
    }
  },
  "required": [
    "id",
    "name"
  ],
  "additionalProperties": false,
  "description": "Structured create policy output schema for MCP tools.",
  "$schema": "http://json-schema.org/draft-07/schema#"
}