Skip to main content
Glama

Create branch

gitlab_create_branch

Create a new GitLab project branch from a specified ref to isolate changes, fixes, or features before merging.

Instructions

Create a new branch in a project.

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

Returns: Response: The response object containing a Branch model.

Raises: MissingParameterError: If required parameters are 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 non-read-only, non-idempotent, non-destructive, open-world behavior, so the safety profile is covered. The description adds that it returns a Branch model and raises MissingParameterError/ParameterError, which is useful error-behavior context. It omits what happens on duplicate branch names and why pagination params exist for a create call.

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 one-line summary is front-loaded and efficient, but the rest is auto-generated docstring boilerplate (Args/Returns/Raises) whose Args section conveys almost nothing. It is short, but several sentences don't earn their place.

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?

A 7-parameter mutation tool with no output schema and zero schema coverage needs the description to explain which parameters are essential (branch/ref semantics) and what pagination parameters mean here. It does not, leaving key calling details to inference.

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%, so the description must carry parameter meaning, but it only lists three names via a generic **kwargs clause (project_id, branch, ref) without explaining that branch is the new branch name and ref is the source ref. The page, per_page, max_pages, and api_parameters parameters are completely undocumented anywhere.

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 first line states a specific verb and resource ("Create a new branch in a project"), which is unambiguous. It does not distinguish itself from nearby siblings such as gitlab_create_tag or gitlab_create_commit, but the core purpose is clear.

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 guidance on when to use this versus alternatives (gitlab_get_branch, gitlab_delete_branch, gitlab_protect_branch, or generic api_request). The Raises section documents failure modes, not usage conditions.

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