# Create branch policy

Tool: `veryfront__create_branch_policy`

Create a merge policy for branches matching a pattern. Requires project.settings.manage.

## Arguments

| Name                    | Type                   | Required | Description                                                                                      |
| ----------------------- | ---------------------- | -------- | ------------------------------------------------------------------------------------------------ |
| `name`                  | string                 | Yes      | Policy name                                                                                      |
| `is_enabled`            | boolean                |          | Enable the policy (default: true).                                                               |
| `required_approvals`    | integer · min 0        |          | Required approvals (default: 1). REST/GraphQL default to 0.                                      |
| `allow_self_approval`   | boolean                |          | Allow the merger’s approval to count (default: false). REST/GraphQL default to true.             |
| `target_branch_pattern` | string \| null         |          | Pattern to match branches (e.g., "main", "release/\*"). Omit or send null to match every branch. |
| `required_reviewer_ids` | array of string · uuid |          | User IDs who must approve before a matching branch can merge.                                    |
| `project_reference`     | string                 |          | Project ID or slug                                                                               |

## 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__create_branch_policy",
    "arguments": {
      "name": "string"
    }
  }
}'
```

## Example response

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "content": [
      {
        "type": "text",
        "text": "{\"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\"}"
      }
    ],
    "structuredContent": {
      "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"
    }
  }
}
```
