Skip to main content
Glama

set_approval_gate

Destructive

Create or update a branch approval gate that requires approving reviews before merges, with optional team, role, and path-based reviewer rules.

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

NameRequiredDescriptionDefault
created_byYesWho 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_rulesNoOrdered 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_idYesThe id of the design, preset or feature whose branch is protected.
branch_nameYesThe target branch being protected, typically ``main`` or a release-channel name.
artifact_typeYesWhat the gate protects: ``"design"``, ``"preset"`` or ``"feature"``. Any other value is refused.
required_roleNoOnly 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_countYesThe minimum number of approving reviews a merge needs. ``0`` is accepted; a negative number is refused.
applies_to_ownerNoA design's rule only. When true, the rule holds the design's owner too: on Kiln's servers the branch then changes only through a merge that meets the rule, and the owner's own direct changes and pushes to it are refused (``BRANCH_PROTECTED``). It is kept only where the rules are kept in a Kiln account; anywhere else it is refused (``OWNER_RULE_ACCOUNT_ONLY``) and nothing is saved. When false (the default), the owner may still change the branch directly. Each save of the rule sets it again. Default: false.
required_team_idNoOnly members of this team count as approvers. Empty means no team restriction. Default: "".
allow_unsatisfiableNoWhen 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_requestedNoWhen true (the default), a ``REQUEST_CHANGES`` review blocks the merge until it is changed. Default: true.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv1.6.0
    • addedInput schema / properties / applies_to_owner
      Added value: +{
      +  "description": "A design's rule only.  When true, the rule holds the design's owner too: on Kiln's servers the branch then changes only through a merge that meets the rule, and the owner's own direct changes and pushes to it are refused (``BRANCH_PROTECTED``).  It is kept only where the rules are kept in a Kiln account; anywhere else it is refused (``OWNER_RULE_ACCOUNT_ONLY``) and nothing is saved.  When false (the default), the owner may still change the branch directly. Each save of the rule sets it again. Default: false.",
      +  "title": "Applies To Owner",
      +  "type": "boolean"
      +}
  2. Changed10 schema fields changedv1.5.1
    • changedInput schema / properties / allow_unsatisfiable / description
      Previous value: -"Default: false."New value: +"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."
    • addedInput schema / properties / artifact_id / description
      Added value: +"The id of the design, preset or feature whose branch is protected."
    • addedInput schema / properties / artifact_type / description
      Added value: +"What the gate protects: ``\"design\"``, ``\"preset\"`` or ``\"feature\"``.  Any other value is refused."
    • changedInput schema / properties / block_changes_requested / description
      Previous value: -"Default: true."New value: +"When true (the default), a ``REQUEST_CHANGES`` review blocks the merge until it is changed. Default: true."
    • addedInput schema / properties / branch_name / description
      Added value: +"The target branch being protected, typically ``main`` or a release-channel name."
    • addedInput schema / properties / created_by / description
      Added value: +"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."
    • addedInput schema / properties / path_rules / description
      Added value: +"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."
    • addedInput schema / properties / required_count / description
      Added value: +"The minimum number of approving reviews a merge needs.  ``0`` is accepted; a negative number is refused."
    • changedInput schema / properties / required_role / description
      Previous value: -"Default: \"\"."New value: +"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: \"\"."
    • changedInput schema / properties / required_team_id / description
      Previous value: -"Default: \"\"."New value: +"Only members of this team count as approvers.  Empty means no team restriction. Default: \"\"."
  3. Addedv1.5.0

TDQS

B3.4/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already flag destructiveHint=true and readOnlyHint=false; the description adds the Kiln Business entitlement gate and the upsert nature ('create or update'), which are useful beyond the annotations. It does not warn that an update overwrites existing gate rules, nor what permission level is needed or what happens on refusal — notable omissions for a destructive mutation.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two short lines, purpose front-loaded, zero filler. The second line 'Needs Kiln Business' is a fragment whose meaning (entitlement required, call will fail otherwise) has to be inferred, which slightly weakens an otherwise clean structure.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

An 11-parameter destructive mutation with no output schema warrants more than a two-line description; the rich schema compensates for parameter detail, but nothing states the overwrite behavior of an update, the failure modes, or what is returned. Adequate but with clear gaps given the tool's complexity.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100% and each parameter carries detailed semantics (refusal conditions, defaults, empty-vs-omit behavior), so the schema already does this work. The description adds nothing about individual parameters, which is the correct baseline 3.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb pair plus resource and scope: 'Create or update an approval gate on a target branch.' An agent can distinguish it from remove_approval_gate and list_approval_gates by the create/update phrasing, though those siblings are never named explicitly.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

'Needs Kiln Business' gives a real prerequisite, which is more than nothing, but there is no guidance on when to use this versus remove_approval_gate, list_approval_gates or evaluate_pr_approval, and no statement of when not to use it.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Deploy Server

Other Tools