Skip to main content
Glama

Unprotect branch

gitlab_unprotect_branch
DestructiveIdempotent

Remove protection from a GitLab project branch to allow permitted pushes, merges, or deletion when protection blocks changes.

Instructions

Unprotect a specific branch in a project.

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

Returns: Response: A wrapper containing the original response (no data for successful deletion).

Raises: MissingParameterError: If the project_id or branch is 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_unprotect_branch"
  }
}

Input Schema

NameRequiredDescriptionDefault
refNo
pageNo
branchNo
confirmNoExplicitly confirm this destructive operation. Needed only when the client cannot answer a confirmation prompt.
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. Changed1 schema field changedv27.3.18
    • addedInput schema / properties / confirm
      Added value: +{
      +  "default": false,
      +  "description": "Explicitly confirm this destructive operation. Needed only when the client cannot answer a confirmation prompt.",
      +  "type": "boolean"
      +}
  3. First observedv27.3.13

TDQS

B3/5.0
Behavior3/5

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

Annotations already declare the key behavioral profile (destructiveHint=true, idempotentHint=true, readOnlyHint=false, openWorldHint=true). The description adds useful error conditions and return shape, but does not explain what 'unprotect' actually removes or whether the branch itself is preserved, missing context beyond safety hints.

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 text is short and front-loads the core purpose. The 'Args: **kwargs' boilerplate is not informative, but there is no excessive wording.

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 destructive, 7-parameter mutation with low schema coverage, the description covers purpose, errors, and return value minimally. It lacks detail on what protection settings are removed and on permission requirements, leaving meaningful gaps for an agent to infer.

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 only 14%, so the description carries a heavy burden. It mentions project_id and branch indirectly via the Raises section, clarifying they are needed, but leaves ref, page, per_page, max_pages, and the kwargs convention unexplained.

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 states a specific verb ('Unprotect') and resource ('branch in a project'), which is clear. It does not explicitly differentiate from close siblings such as gitlab_protect_branch, gitlab_delete_branch, or gitlab_unprotect_tag, 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 alternatives like gitlab_delete_branch or gitlab_protect_branch. Usage is only inferable from the tool name; no prerequisites or exclusions are mentioned.

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