Skip to main content
Glama

list_protected_branches

Read-only

Retrieve branch-protection rules for a GitLab or Gitea project, including force-push flags, to audit which branches restrict pushes and protect release workflows.

Instructions

[READ] Branch-protection rules for a project (incl. force-push flags).

Returns {project, protections:[...], returned, limit, truncated}.

Args: project: Project id or full path. limit: Max rows to return (default 100). target: Server target name from config; omit for the default.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNo
targetNo
projectYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.5.0

TDQS

A4.2/5.0
Behavior4/5

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

Annotations only declare readOnlyHint=true, which the '[READ]' tag merely restates. The description goes beyond that by disclosing the return shape ({project, protections, returned, limit, truncated}) and the presence of truncation, which is valuable given there is no output schema. It stops short of explaining pagination semantics, auth requirements, or what a truncated response implies for follow-up calls.

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?

Front-loaded purpose line, then the return shape, then a tight args list — every sentence carries information with no padding. Well sized for a three-parameter read tool.

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

Completeness5/5

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

For a low-complexity read-only list tool with no output schema, the description covers purpose, all three parameters, and the response envelope including truncation. Nothing essential for calling it correctly is missing, though paging guidance would be a bonus.

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?

With 0% schema description coverage, the description fully carries the burden: it explains project accepts an id or full path, limit is max rows with a default of 100, and target is a server target name from config that may be omitted for the default. No parameter is left ambiguous.

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 and resource: 'Branch-protection rules for a project (incl. force-push flags).' The resource and the explicit mention of force-push flags make it unmistakable from generic siblings like list_branches, and the '[READ]' prefix signals it is not the mutating update_branch_protection.

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?

There is no statement of when to use this tool versus alternatives such as list_branches or update_branch_protection, no prerequisites (e.g. required access level), and no explanation of what to do when results are truncated. Usage is only inferable from the name and '[READ]' tag.

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