Skip to main content
Glama

Gitlab Graphql Ops Delete Merge Request

gitlab_graphql_ops_delete_merge_request
Destructive

Close a GitLab merge request through GraphQL when deletion isn't available; requires explicit confirmation before proceeding.

Instructions

Close a merge request through GraphQL (GitLab does not delete over GraphQL).

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>",
      "merge_request_iid": "<merge_request_iid>"
    },
    "name": "gitlab_graphql_ops_delete_merge_request"
  }
}

Input Schema

NameRequiredDescriptionDefault
confirmNoMust be true; set only after the person agrees.
project_idYesProject id or full path.
merge_request_iidYesMerge request iid.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed5 schema fields changedv27.3.20
    • addedInput schema / properties / confirm
      Added value: +{
      +  "default": false,
      +  "description": "Must be true; set only after the person agrees.",
      +  "type": "boolean"
      +}
    • addedInput schema / properties / merge_request_iid
      Added value: +{
      +  "description": "Merge request iid.",
      +  "type": "integer"
      +}
    • removedInput schema / properties / params_json
      Removed value: -{
      -  "default": "{}",
      -  "description": "JSON string of parameters to pass to the action.",
      -  "type": "string"
      -}
    • addedInput schema / properties / project_id
      Added value: +{
      +  "description": "Project id or full path.",
      +  "type": "string"
      +}
    • addedInput schema / required
      Added value: +[
      +  "project_id",
      +  "merge_request_iid"
      +]
  2. First observedv27.3.13

TDQS

A3.6/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=false and destructiveHint=true, so the safety profile is known. The description adds genuinely useful context by clarifying that the operation is a close rather than a true delete due to a GraphQL API limitation, but it omits whether closing is reversible, whether it requires ownership/permissions, and fails to mention the confirm gate that the schema imposes.

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?

One short sentence with the core action front-loaded and the caveat in a parenthetical. Nothing is wasted and the key name/behavior mismatch is stated immediately.

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 single-target mutation with full schema coverage and destructive annotations, the description covers the essential 'what' and the API-limit caveat. It could go further by noting reversibility or permission requirements, but nothing critical is missing for correct invocation.

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%, so project_id, merge_request_iid, and the confirm flag are already documented in structured data. The description adds no format hints (e.g., project path vs numeric id) beyond what the schema states, so baseline 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?

The description gives a specific verb and resource ('Close a merge request') plus transport ('through GraphQL'), and resolves the confusing name by explaining that GitLab offers no delete mutation over GraphQL, so this tool closes instead. It does not explicitly distinguish itself from update_merge_request, which can also change MR state, so it stops short of a 5.

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?

Usage is only implied: an agent can infer it should call this to terminate an MR lifecycle. There is no statement of when to prefer it over gitlab_update_merge_request (state change) or the REST-based delete siblings, and no mention of preconditions beyond the schema's confirm flag.

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