Skip to main content
Glama

Close merge request

gitlab_close_merge_request
Destructive

Closes a GitLab merge request without merging it, marking the change as closed or abandoned instead of merged.

Instructions

Close a merge request without merging it (destructive).

PUT .../merge_requests/:iid with state_event=close. A closed merge request returns its state and writes nothing new.

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_close_merge_request"
  }
}

Input Schema

NameRequiredDescriptionDefault
project_idNo
approval_refNoOwner approval receipt for this operation; required by every owner-approved tool.
merge_request_iidNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv27.3.26

TDQS

A4/5.0
Behavior4/5

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

Annotations already declare destructiveHint=true and readOnlyHint=false, so the safety profile is covered; the description still adds real value by naming the underlying call (PUT .../merge_requests/:iid with state_event=close) and the post-condition that the request returns its state without creating new records. It stops short of saying the action is reversible (reopen) or that approval_ref is required, which are the remaining behavioral gaps.

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?

Three short sentences with the action and its destructive nature front-loaded, followed by implementation detail and outcome. The phrase 'returns its state and writes nothing new' is slightly awkward but still informative rather than padding.

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

Completeness5/5

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

For a simple mutation tool with no output schema and annotations that already cover destructiveness and openness, the description supplies the endpoint mechanics and outcome an agent needs to call it correctly.

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 only 33%, so the description must compensate, and it does so only for the iid by showing it as the path identifier in the endpoint template. project_id (nullable, no description) and the unusual approval_ref receipt — 'required by every owner-approved tool' — are never addressed in the description, leaving a meaningful gap.

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?

States a specific verb and resource — 'Close a merge request without merging it' — and the parenthetical explicitly separates it from the merge/accept siblings in the catalog. An agent can distinguish this from gitlab_accept_merge_request or gitlab_graphql_ops_delete_merge_request without opening a schema.

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

Usage Guidelines3/5

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

The 'without merging it' clause implies the condition for choosing close over accept/merge, but there is no explicit when-to-use or when-not guidance, and no routing toward alternatives such as deletion or update-state siblings. Usage is inferable rather than stated.

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