Skip to main content
Glama

Delete Branch Tool

delete_branch_tool

Deletes a branch from a GitLab repository by specifying the project ID or path and branch name, helping clean up merged or obsolete branches.

Instructions

Delete a branch from a GitLab repository.

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": "delete_branch_tool"
  }
}

Input Schema

NameRequiredDescriptionDefault
branchYesBranch name to delete
project_idYesProject ID or path

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.4.1

TDQS

C2.9/5.0
Behavior2/5

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

No annotations are provided, so the description carries the full behavioral burden, yet it only restates that a delete happens. It says nothing about irreversibility, protected branches, required access level, or what happens to commits unique to the deleted branch. 'Delete' at least signals mutation, so this is not a contradiction, just a large gap.

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?

A single front-loaded sentence with zero redundancy. It is efficient, though the terseness borders on under-specification for a destructive operation.

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 an irreversible deletion with no annotations to fall back on, the description leaves out critical context: irreversibility, error conditions (missing branch, protected branch), and permission requirements. An output schema exists, so return values need not be explained, but the behavioral gaps remain significant.

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%, and both parameters ('project_id' and 'branch') are documented in the schema. The description adds no meaning beyond that, so the baseline of 3 applies.

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?

States a specific verb ('Delete') and resource ('a branch from a GitLab repository'), making it clearly distinct from create_branch_tool, get_project_branch_tool and list_project_branches_tool. It does not name siblings explicitly, but the operation 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 guidance on when to use this versus alternatives, no prerequisites (permissions, protected-branch rules), and no warning that the deletion is irreversible. The agent must infer all of this from the verb alone.

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