Skip to main content
Glama

Protect Branch

gitlab_protect_branch

Protect a GitLab branch or wildcard rule by setting role-based access levels for push, merge, and unprotect actions.

Instructions

Protect a branch or wildcard rule and configure role-based push, merge, and unprotect access.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
branchYes
project_idNo
allow_force_pushNo
push_access_levelNo
merge_access_levelNo
unprotect_access_levelNo
code_owner_approval_requiredNo
Behavior3/5

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

Annotations already indicate it's a write operation (readOnlyHint=false), non-idempotent, and non-destructive. The description adds that it configures access, which implies mutation, but doesn't elaborate on side effects, permissions needed, or reversibility beyond what annotations suggest.

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?

The description is a single, well-structured sentence that starts with the action verb. It is concise (18 words) with no unnecessary details. However, the brevity sacrifices completeness for parameter semantics.

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

Completeness2/5

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

Given 7 parameters, 0% schema coverage, no output schema, and no annotations on parameters, the description is too brief. Critical information like what each access level means, wildcard rule syntax, and the role of project_id is missing. The tool's complexity demands a richer description.

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

Parameters2/5

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

Schema description coverage is 0%, and the description only mentions 'branch or wildcard rule' and general access types (push, merge, unprotect). It fails to explain constants like push_access_level numbers (0,30,40,60) or what they represent (e.g., access levels). The description does not add sufficient meaning beyond the schema constraints.

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?

The description clearly states the verb 'Protect', the resource 'a branch or wildcard rule', and the configuration 'role-based push, merge, and unprotect access'. It effectively distinguishes from sibling tools like gitlab_unprotect_branch and gitlab_get_protected_branch.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives, no prerequisites (e.g., required permissions), and no examples of typical use cases. Siblings exist but are not mentioned for differentiation.

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/mcpland/gitlab-mcp'

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