Skip to main content
Glama

Delete branch

gitlab_delete_branch
DestructiveIdempotent

Deletes a branch from a GitLab project using the project ID and branch name, useful for removing obsolete or merged branches.

Instructions

Delete a branch in a project.

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

Returns: Response: The response object (no data for successful deletion).

Raises: MissingParameterError: If required parameters are missing. ParameterError: If invalid parameters are provided.

Input Schema

NameRequiredDescriptionDefault
refNo
pageNo
branchNo
per_pageNo
max_pagesNo
project_idYes
api_parametersNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. 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 destructiveHint=true, idempotentHint=true, readOnlyHint=false, and openWorldHint=true, so the safety profile is covered. The description adds useful context that successful deletion returns no data and that missing or invalid parameters raise errors, but it does not disclose protected-branch restrictions, permission requirements, or irreversibility beyond what the annotations imply.

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 first sentence is concise and front-loaded, but the remaining Args/Returns/Raises block includes generic docstring boilerplate, especially the **kwargs line, which is low-value. The return and error sections are somewhat useful but not tightly tailored to this tool.

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?

This is a destructive mutation with 7 parameters, 0% schema description coverage, and no output schema. The description does not fully compensate: it leaves branch-parameter semantics ambiguous and omits important operational context such as protected branch behavior, permissions, and confirmation needs.

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%, so the description must carry parameter meaning, but it only vaguely mentions project_id and branch as example kwargs. It does not explain the roles of ref, page, per_page, max_pages, or api_parameters, and it does not clarify whether branch is effectively required despite the schema only requiring project_id.

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 states a specific verb and resource: delete a branch in a project. It is clear enough to distinguish from create_branch or get_branch, though it does not explicitly differentiate from the sibling gitlab_delete_merged_branches, which could be confused for bulk deletion.

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?

The description gives no explicit guidance on when to use this tool versus alternatives, nor does it mention prerequisites such as protected branch rules, permissions, or whether branch deletion is allowed. Usage is only implied by the tool name and first sentence.

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