Skip to main content
Glama

Create branch

gitlab_create_branch

Create a new branch in a GitLab project from a specified ref, using project ID and branch name, to isolate changes for development or review.

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.

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_create_branch"
  }
}

Input Schema

NameRequiredDescriptionDefault
refNo
pageNo
branchNo
per_pageNo
max_pagesNo
project_idNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed5 schema fields changedv27.3.20
    • removedInput schema / properties / api_parameters
      Removed value: -{
      -  "anyOf": [
      -    {
      -      "additionalProperties": true,
      -      "type": "object"
      -    },
      -    {
      -      "type": "null"
      -    }
      -  ],
      -  "default": null
      -}
    • changedInput schema / properties / page / default
      Previous value: -1New value: +null
    • changedInput schema / properties / per_page / default
      Previous value: -100New value: +null
    • addedInput schema / properties / project_id / default
      Added value: +null
    • removedInput schema / required
      Removed value: -[
      -  "project_id"
      -]
  2. 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=false, openWorldHint=true, idempotentHint=false, destructiveHint=false, so the safety profile is covered. The description adds real value beyond them by naming the return type (a Branch model) and two error conditions (MissingParameterError, ParameterError). It does not say what happens when the branch name already exists or which permissions are required, which is the main behavioral gap for a create operation.

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 lead sentence is front-loaded and efficient, and the Returns/Raises sections are informative. However, the 'Args: **kwargs: Additional parameters for the request' block is boilerplate that conveys nothing and occupies a third of the description.

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 mutation tool with six undocumented parameters, no output schema, and 0% schema coverage, the description is thin: it omits required-input expectations (despite mentioning MissingParameterError), failure modes such as name collisions, and the behavior of the pagination parameters. Only the return model and two exception types are covered.

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 6 parameters, so the description must carry the burden. It only surfaces project_id, branch and ref as illustrative kwargs and gives no meaning, format, or constraints for any of them (e.g., that ref may be a branch name, tag, or SHA). It also leaves page, per_page and max_pages completely unexplained even though they appear on a create call.

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 sentence names a specific verb and resource ('Create a new branch in a project'), which is enough to separate it from siblings like gitlab_get_branch, gitlab_delete_branch, or gitlab_create_tag. It stops short of explicitly contrasting with the nearest alternatives (create_tag, create_commit), but the resource is unambiguous.

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 statement of when to use this versus alternatives, no prerequisite context (e.g., branch must not already exist, source ref required), and no note about permissions. The only hint of usage conditions is the generic 'MissingParameterError' mention, which implies required parameters the schema does not actually mark as required.

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