Skip to main content
Glama

gluecron_set_branch_protection

Idempotent

Set branch protection for one branch (partial update: fields you omit keep their value). Edits the rule named exactly after the branch; when only a glob rule covers it, a new exact rule is created seeded from the glob's settings and checks. required_checks replaces the required-check list ([] clears it). require_pr_run: a required check that names a workflow is met only by that workflow's pull_request run. Requires ADMIN access to the repo and 'repo' scope. Audit-logged. Returns the resulting rule plus {created, warnings}.

Input Schema

NameRequiredDescriptionDefault
repoYesRepo name
ownerYesRepo owner — username or organisation slug
branchYesBranch name (not a pattern)
allow_deletionNo
require_pr_runNoWorkflow checks count only from the PR's pull_request run
required_checksNoArray of check names that must pass (workflow names, gate names or commit-status contexts); [] clears the list
allow_force_pushNo
enable_auto_mergeNoBranch-wide autopilot auto-merge (K2)
required_approvalsNoHuman approvals required (0-10)
require_ai_approvalNo
require_green_gatesNo
require_human_reviewNo
require_pull_requestNo
dismiss_stale_reviewsNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.1/5.0
Behavior5/5

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

Goes well beyond the annotations by disclosing partial-update semantics (omitted fields keep their value), exact-rule editing, glob-rule seeding behavior, list-replacement behavior of required_checks, require_pr_run semantics, required ADMIN authorization, audit logging, and the return shape. This is rich behavioral context an agent could not infer from idempotentHint/destructiveHint.

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?

Front-loads the core operation and partial-update rule, then layers detail on the tricky parameters and the side effects. It is dense and information-rich rather than padded, though it is on the longer side and could be trimmed slightly without loss.

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

Completeness4/5

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

Given 14 parameters, no output schema, and a mutation with authorization requirements, the description covers the operation, side effects (audit-logged), auth needs, and the return shape ('resulting rule plus {created, warnings}'). It is close to complete, with the main gap being the undocumented boolean parameters.

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 coverage is 50%, and the description explains the two most subtle parameters (required_checks replaces the list / [] clears; require_pr_run semantics). But roughly nine boolean parameters (allow_deletion, allow_force_push, enable_auto_merge, required_approvals, require_ai_approval, etc.) carry no meaning in either the description or the schema, so it only partially compensates for the coverage gap.

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

Purpose5/5

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

States a specific verb+resource ('Set branch protection for one branch') and immediately clarifies scope and mutation semantics, distinguishing it from the read counterpart gluecron_get_branch_protection. The exact-vs-glob rule behavior further pins down what the tool actually does.

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?

Provides a prerequisite ('Requires ADMIN access to the repo and 'repo' scope') and describes when a new rule is created versus edited, which is useful context. However, it never states when to prefer this tool over alternatives (e.g., the read tool) or when not to use it, leaving usage guidance implied.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources