Skip to main content
Glama
AIops-tools

cicd-aiops

update_branch_protection

Protect or unprotect a branch in your CI/CD pipeline with reversible changes and dry-run preview. Enforce safe push rules or lift them as needed.

Instructions

[WRITE][risk=medium] Protect/unprotect a branch; reversible.

Reads the branch's current protection first so the harness records an undo that replays this same tool with the prior settings. Pass dry_run=True to preview.

Args: project: Project id or full path. branch: Branch name (from list_branches). protect: True to protect the branch, False to remove protection. allow_force_push: Whether the protection permits force-push (default False — the safe setting). dry_run: If True, preview without changing. target: Server target name from config; omit for the default.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
branchYes
targetNo
dry_runNo
projectYes
protectNo
allow_force_pushNo
Behavior5/5

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

With no annotations, the description fully discloses behavioral traits: it is a write operation with medium risk, it reads current protection first for undo capability, and provides a dry-run option for preview. It also notes reversibility. This is exemplary disclosure beyond what structured data provides.

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

Conciseness5/5

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

The description is concise and well-structured: front-loaded with key info ('[WRITE][risk=medium] Protect/unprotect a branch; reversible.'), followed by essential context about undo, then a clear Args list. Every sentence adds value with no redundancy.

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 the tool's complexity (6 parameters, no output schema), the description covers behavior, parameters, and side effects well. However, it omits details about the return value or status upon success/failure. This is a minor gap but does not hinder correct invocation.

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

Parameters5/5

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

Schema description coverage is 0%, so the description carries full burden. The Args section adds meaningful explanations for each parameter (e.g., 'protect: True to protect, False to remove', 'allow_force_push: default False — the safe setting'), which greatly aids understanding beyond the schema's type/default.

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?

Description explicitly states the verb and resource: 'Protect/unprotect a branch'. It is clear and distinguishes itself from sibling tools like list_protected_branches, which only read. The reversible nature and undo mechanism further clarify its unique purpose.

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

Usage Guidelines4/5

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

The description implies when to use (to change branch protection) and provides context like dry_run for preview. However, it does not explicitly state when not to use or provide alternatives, though no direct alternatives exist among siblings. The guidance is clear but not exhaustive.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/AIops-tools/CICD-AIops'

If you have feedback or need assistance with the MCP directory API, please join our Discord server