set_approval_gate
Create or update an approval gate on a design, preset, or feature branch to require a set number of approving reviews before merge. Restrict approvers by team, role, or path.
Instructions
Create or update an approval gate on a target branch.
Needs Kiln Business.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"artifact_type": "<artifact_type>",
"artifact_id": "<artifact_id>",
"branch_name": "<branch_name>",
"required_count": "<required_count>",
"created_by": "<created_by>"
},
"name": "set_approval_gate"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| created_by | Yes | Who is setting the gate. On Kiln's hosted server it is read from the signed-in session and a different value is refused; on a local install it is the operator's name. | |
| path_rules | No | Ordered per-path reviewer rules added on top of the gate, each ``{"path_pattern", "required_team_id", "required_role", "required_count"}``. Omit it to leave existing rules untouched; ``[]`` clears them. A pattern no merge can match is refused. | |
| artifact_id | Yes | The id of the design, preset or feature whose branch is protected. | |
| branch_name | Yes | The target branch being protected, typically ``main`` or a release-channel name. | |
| artifact_type | Yes | What the gate protects: ``"design"``, ``"preset"`` or ``"feature"``. Any other value is refused. | |
| required_role | No | Only approvers with at least this org role count: ``"owner"``, ``"admin"``, ``"member"`` or ``"viewer"``. Left empty with no team on an org-owned artifact, it becomes ``"member"``. Default: "". | |
| required_count | Yes | The minimum number of approving reviews a merge needs. ``0`` is accepted; a negative number is refused. | |
| required_team_id | No | Only members of this team count as approvers. Empty means no team restriction. Default: "". | |
| allow_unsatisfiable | No | When true, keep a gate whose rules ask for more qualifying reviewers than the org has, with the problem reported under ``rule_warnings``. When false (the default), such a gate is refused and nothing is saved. Default: false. | |
| block_changes_requested | No | When true (the default), a ``REQUEST_CHANGES`` review blocks the merge until it is changed. Default: true. |