Skip to main content
Glama

Delete repository branch

delete_branch
Destructive

Delete a GitLab repository branch, excluding protected branches, by specifying the project and branch name.

Instructions

Delete a GitLab repository branch. Protected branches cannot be deleted through this operation.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
branchYes
projectYesGitLab project ID or full path such as group/project.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYesGitLab response normalized for model use.
Behavior4/5

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

Annotations already declare destructiveHint=true, so the agent knows this is destructive. The description adds a useful behavioral boundary (protected branches cannot be deleted) that goes beyond the annotations, providing important context about what will fail. It does not contradict 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?

The description is two concise sentences. The first sentence states the action, and the second provides a key warning. No wasted words, and the important information is front-loaded.

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

Completeness4/5

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

For a simple deletion tool with 2 params and an output schema (though not shown), the description covers the main caveat (protected branches) and relies on annotations for destructiveness. It could also mention default branch behavior, but overall it provides sufficient context for an agent to use the tool safely.

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?

The schema documents the 'project' parameter well (ID or full path), but 'branch' only has a minLength constraint. The description does not add any parameter-level detail (e.g., branch name format or default branch restrictions). With 50% schema coverage, the description should compensate but fails to, though parameter names are self-explanatory.

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?

The description clearly states a specific action ('Delete a GitLab repository branch') with a clear resource (branch). It distinguishes itself from sibling delete tools (e.g., delete_file, delete_tag) by explicitly naming the resource type.

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

Usage Guidelines4/5

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

The description gives clear context for when to use the tool and includes an explicit limitation ('Protected branches cannot be deleted through this operation.'). However, it does not name alternative tools or steps (e.g., unprotect_branch) for handling protected branches, so it falls short of full when-to-use guidance.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/CobolJunkie/gitlab-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server