Skip to main content
Glama

get_branch

Fetch a GitLab branch's details, commit SHA, and protection rules using its project ID and branch name for repository inspection.

Instructions

Get specific branch details, commit SHA, and protection rules

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
branchYesBranch name (e.g. 'main' or 'feature/user-auth')
project_idYesProject numeric ID (e.g. 31) or namespace path (e.g. 'group/project-name'). URL-encoding is handled automatically.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv2.0.0

TDQS

B3.2/5.0
Behavior3/5

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

No annotations are provided, so the description carries the burden. 'Get' implies a read-only, non-destructive operation and it usefully discloses the return content (commit SHA, protection rules), but it says nothing about required permissions, access scope, or error behavior for a private-project read.

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; the resource is named immediately and the returned fields follow. Nothing to trim, though it is sparse rather than rich.

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

Completeness3/5

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

For a two-parameter read tool with no output schema and no annotations, the description covers purpose and partial return content but omits usage context, permissions, and error handling. Adequate but with clear gaps.

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

Parameters3/5

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

Schema description coverage is 100%, with both project_id and branch fully documented including format examples. The description adds no parameter-level detail, so the baseline 3 applies since the schema does the heavy lifting.

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?

States a specific verb ('Get') and resource ('branch') and enumerates what the call returns: details, commit SHA, and protection rules. It clearly reads as the singular counterpart to list_branches, but it never names or explicitly contrasts with that sibling.

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 such as list_branches (to enumerate) or create_branch/delete_branch. An agent must infer usage purely from the verb.

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