Skip to main content
Glama

Get protected branch

gitlab_get_protected_branch
Read-onlyIdempotent

Retrieve details for a specific protected branch in a GitLab project to inspect access, merge, and push permissions.

Instructions

Get information about a specific protected branch in a project.

Args: **kwargs: Additional parameters for the request (e.g., project_id, branch).

Returns: Response: A wrapper containing the original response and a Branch model.

Raises: MissingParameterError: If the project_id or branch is missing. ParameterError: If invalid parameters are provided.

Input Schema

NameRequiredDescriptionDefault
refNo
pageNo
branchNo
per_pageNo
max_pagesNo
project_idYes
api_parametersNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv27.3.13

TDQS

C2.8/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true, idempotentHint=true, destructiveHint=false and openWorldHint=true, so the safety profile is covered. The description adds real value by disclosing the return shape ('a wrapper containing the original response and a Branch model') and the error cases, which annotations do not express. It stops short of noting that openWorld access requires a configured GitLab instance/token or any pagination behavior.

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

Conciseness3/5

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

The first sentence is front-loaded and efficient, but the boilerplate Args/Returns/Raises scaffolding is generic docstring padding. The Args entry in particular is vague ('Additional parameters') and consumes space without conveying usable information.

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 7-parameter tool with zero schema description coverage and no output schema, the agent is left guessing about most inputs, including whether branch is truly required and what page/per_page/max_pages do. The Returns note partially compensates for the missing output schema, but the parameter-side gap is too large for the description's brevity.

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 7 parameters, so the description must compensate and largely does not. It only names project_id and branch (via the Raises block) and leaves ref, page, per_page, max_pages and api_parameters entirely undocumented. The '**kwargs: Additional parameters for the request' framing is also misleading, since the schema sets additionalProperties=false and the Raises claim that branch can raise MissingParameterError conflicts with the schema's required list of only project_id.

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 states a specific verb and resource: 'Get information about a specific protected branch in a project'. This distinguishes it by scope (single protected branch) from list-style siblings such as gitlab_get_protected_branches, though it never names that sibling or the plain gitlab_get_branch to clarify the protected-vs-unprotected distinction.

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 guidance and no mention of alternatives (gitlab_get_branch, gitlab_get_protected_branches). The only contextual signal is the 'Raises' block noting MissingParameterError when project_id or branch is absent, which hints at required inputs but not at tool selection.

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