Skip to main content
Glama

Get protected branch

get_protected_branch
Read-onlyIdempotent

Retrieve details of a specific protected branch to review its push, merge, unprotect, and code-owner approval settings. Query by project ID or path and branch name to verify branch protection policies.

Instructions

Inspect one protected branch and its push, merge, unprotect, and code-owner approval policy.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYes
projectYesGitLab project ID or full path such as group/project.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYesGitLab response normalized for model use.
Behavior3/5

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

Annotations already declare readOnlyHint=true and destructiveHint=false, so the safety profile is known. The description adds context about which policies are covered (push, merge, unprotect, code-owner approval), but it does not add other behavioral details like error handling or permission requirements, making it moderately useful.

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?

A single, clear sentence that is front-loaded with the verb and resource, with no redundant information. Every word earns its place.

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?

The tool is simple and well-annotated, with an output schema available. The description is sufficient to convey the purpose and scope, though it lacks explicit mention of input parameter semantics or error scenarios, which are minor gaps for this read-only operation.

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 coverage is only 50% (project has a description, name does not). The description does not explain the parameters or compensate for the missing 'name' description, forcing the agent to infer from the tool name.

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 uses the verb 'Inspect' to indicate a read operation on 'one protected branch' and enumerates the specific policy aspects (push, merge, unprotect, code-owner approval). It clearly distinguishes from sibling tools like list_protected_branches (which lists all) and protect/unprotect (which mutate).

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?

The description implies usage for retrieving details of a single protected branch but does not explicitly state alternatives or exclusions, such as using list_protected_branches for multiple branches. It provides limited guidance on when to choose this tool over others.

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

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