Skip to main content
Glama

update_default_branch

Destructive

Change a project's default branch to control which branch GitLab uses for clones, merge requests, and CI pipelines. Requires maintainer permission and updates project settings.

Instructions

Change the default branch of a project. Use this to change which branch GitLab treats as the project's default; use create_branch to create a branch rather than changing project defaults. The operation changes project settings and may affect clone, merge request, and CI defaults, requires project-maintainer permission, and returns the updated project or a validation/permission error.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
jmespathNoOptional JMESPath expression filtering the JSON result before return.
project_idYesProject ID or complete URL-encoded path to project
default_branchYesThe new default branch name for the project

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv2.1.66
    • addedInput schema / properties / jmespath
      Added value: +{
      +  "description": "Optional JMESPath expression filtering the JSON result before return.",
      +  "type": "string"
      +}
  2. Changed1 schema field changedv2.1.62
    • changedInput schema / required
      Previous value: -[
      -  "default_branch",
      -  "project_id"
      -]New value: +[
      +  "project_id",
      +  "default_branch"
      +]
  3. Addedv2.1.21

TDQS

A4.7/5.0
Behavior5/5

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

Annotations declare destructiveHint=true and openWorldHint=true, and the description goes beyond them by detailing the collateral effects (clone, MR, CI defaults), permission requirement (project maintainer), and expected return (updated project or validation/permission error). No contradictions with annotations.

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

Conciseness5/5

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

Two sentences with zero filler: the first front-loads the purpose and the second packs usage, effects, permission, and return behavior. Every clause adds value.

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

Completeness5/5

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

For a destructive mutation tool, the description covers what it does, how it differs from a sibling, what side effects occur, permission needed, and the return value. No output schema exists, but the return type is explicitly described. Nothing essential is missing.

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%, so the schema already documents both required parameters. The description adds no new parameter-specific information (e.g., format, constraints), resting on the schema. Baseline 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb ('Change') and resource ('default branch of a project'), and explicitly differentiates from the sibling `create_branch`, making the tool's purpose unambiguous even without inspecting the schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Provides explicit when-to-use ('change which branch GitLab treats as the project's default') and when-not-to-use ('use create_branch to create a branch rather than changing project defaults'), naming the alternative directly. It also states the high-level effect (affects clone, MR, CI defaults) and required permission, giving agents full routing context.

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