Skip to main content
Glama

List Protected Branches

gitlab_list_protected_branches
Read-onlyIdempotent

Lists protected branch rules for a GitLab project so you can identify protected branches and review their access settings.

Instructions

List protected branch rules for a project.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "gitlab_list_protected_branches"
  }
}

Input Schema

NameRequiredDescriptionDefault
pageNo
searchNo
per_pageNo
project_idNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed6 schema fields changedv1.7.0
    • removedInput schema / properties / page / anyOf
      Removed value: -[
      -  {
      -    "type": "number"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedInput schema / properties / page / type
      Added value: +[
      +  "number",
      +  "null"
      +]
    • removedInput schema / properties / per_page / anyOf
      Removed value: -[
      -  {
      -    "type": "number"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedInput schema / properties / per_page / type
      Added value: +[
      +  "number",
      +  "null"
      +]
    • removedInput schema / properties / search / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedInput schema / properties / search / type
      Added value: +[
      +  "string",
      +  "null"
      +]
  2. First observedv1.6.1

TDQS

C2.7/5.0
Behavior2/5

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

Annotations already declare readOnlyHint, idempotentHint, openWorldHint, and destructiveHint=false, so the safety profile is fully covered without the description. The description adds nothing beyond that: no word on pagination behaviour (despite page/per_page being accepted), no default result ordering, and no note that an empty list is the normal response when no rules exist.

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?

A single front-loaded sentence with no filler or redundancy. It is tight, though the brevity borders on under-specification rather than economy given the undocumented parameters.

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?

For a four-parameter list tool with no output schema and zero schema documentation, the description does too little: pagination, search semantics, and the shape/filtering of returned rules are all unexplained. Annotations cover only the safety dimension, leaving the operational picture incomplete.

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% across four parameters, so the description carries the full burden and largely fails. It hints at the project scope (project_id) but never explains page, per_page, or search — an agent cannot tell from the definition that search filters rules by name or that pagination applies.

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

Purpose4/5

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

The description names a specific verb ("List") and a specific resource ("protected branch rules") scoped to a project, so an agent knows exactly what comes back. It stops short of distinguishing itself from near neighbors such as gitlab_list_branches (all branches) or gitlab_get_protected_branch (single rule), leaving the reader to infer the difference from the names alone.

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 when-to-use statement, no exclusion of alternatives, and no prerequisite noted (e.g. that the caller needs maintainer access or that this returns rules rather than branches). The only usage signal is the implicit "for a project" scoping.

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

Deploy Server

Other Tools