Skip to main content
Glama

Get Project Branch Tool

get_project_branch_tool
Read-only

Retrieve a single GitLab repository branch by specifying the project ID or path and branch name, so you can inspect branch details within your workflow.

Instructions

Get a single repository branch.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "project_id": "<project_id>",
      "branch": "<branch>"
    },
    "name": "get_project_branch_tool"
  }
}

Input Schema

NameRequiredDescriptionDefault
branchYesBranch name
project_idYesProject ID or path

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.4.1

TDQS

B3.1/5.0
Behavior2/5

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

The readOnlyHint annotation already establishes the safe read-only behavior, and the output schema covers return values. The description adds no behavioral context such as authentication requirements, not-found behavior, or whether it returns metadata versus branch content.

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?

The description is a single front-loaded sentence with no wasted wording. It is appropriately terse for a simple retrieval tool, though it could have included one clause distinguishing it from the list operation.

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?

For a simple read operation with a fully described two-parameter schema, readOnlyHint, and an output schema, the description is largely sufficient. The only notable gap is guidance on when to choose this over list_project_branches_tool.

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 coverage is 100%, and the schema describes both branch ('Branch name') and project_id ('Project ID or path'). The description adds no additional meaning beyond those fields, so the baseline 3 for high schema coverage is appropriate.

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 gives a clear verb and resource (get a branch) and clarifies it is a single branch rather than a list. It does not explicitly differentiate from close siblings like list_project_branches_tool, create_branch_tool, or compare_branches_tool, so it falls short of a 5.

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 explicit guidance on when to use this tool versus list_project_branches_tool or compare_branches_tool, and no prerequisites or exclusions are stated. The use case is only implied by 'single repository branch.'

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