Skip to main content
Glama

Delete merged branches

gitlab_delete_merged_branches
DestructiveIdempotent

Delete all merged branches in a GitLab project to clean up stale branches and keep the repository organized.

Instructions

Delete all merged branches in a project.

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

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, and openWorldHint=true, so the safety profile is covered. The description adds only that successful deletion returns no data and which error types may be raised, but says nothing about irreversibility, which branches are skipped (protected/merged status), or partial-failure behavior.

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 lead sentence is front-loaded and efficient, but the remaining Args/Returns/Raises block is generic docstring boilerplate that is partially inaccurate (**kwargs does not exist in the schema), adding noise rather than signal.

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?

A destructive, multi-page-capable operation with 7 undocumented parameters and no output schema needs far more than one sentence of explanation. The description omits what gets deleted, what happens across pages, and how the branch/ref filters interact — all essential for safe invocation.

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% across 7 parameters, so the description must compensate and it does not. Worse, it points to '**kwargs (e.g., project_id)' when project_id is actually a required top-level parameter, and it never mentions ref, branch, page, per_page, max_pages, or api_parameters — leaving the pagination/batching behavior (which matters greatly for a bulk delete) undocumented.

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 with clear scope: deleting all merged branches within a single project. It implicitly contrasts with the single-branch sibling gitlab_delete_branch but never names it or clarifies the distinction explicitly.

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?

No guidance on when to use this versus gitlab_delete_branch, no prerequisites (protected branches, default branch, permissions), and no warning about the bulk-destructive nature. The agent must infer usage entirely from the name.

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