Skip to main content
Glama

Approve merge request

gitlab_approve_merge_request
Destructive

Approve a specific GitLab merge request by providing the project ID and merge request IID, enabling code review workflows to proceed.

Instructions

Approve a specific merge request.

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

Returns: Response: A wrapper containing the original response and a MergeRequest model.

Raises: MissingParameterError: If the project_id or merge_request_iid is missing. ParameterError: If invalid parameters are provided.

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

Input Schema

NameRequiredDescriptionDefault
dataNo
nameNo
group_idNo
user_idsNo
group_idsNo
rule_typeNo
project_idNo
report_typeNo
approval_refNoOwner approval receipt for this operation; required by every owner-approved tool.
approval_rule_idNo
merge_request_iidNo
approvals_requiredNo
protected_branch_idsNo
applies_to_all_protected_branchesNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv27.3.26
    • addedInput schema / properties / approval_ref
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "Owner approval receipt for this operation; required by every owner-approved tool."
      +}
  2. First observedv27.3.13

TDQS

C2.9/5.0
Behavior3/5

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

Annotations already declare a non-read-only, destructive, non-idempotent, open-world mutation, and the description adds error conditions plus a return wrapper. However, it omits permission requirements, the approval_ref requirement, the effect of approval on merge readiness, and whether approval is reversible. It also says project_id and merge_request_iid are required via MissingParameterError while the schema marks no parameters as required.

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?

The description is short and front-loads the action, followed by clear Args/Returns/Raises sections. The '**kwargs' framing is generic and adds little, but there is no major bloat.

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?

For a 14-parameter destructive mutation with no output schema and very low schema description coverage, the description leaves critical call details unexplained, including approval_ref, authorization expectations, approval-rule interactions, and the practical effect of approving. It provides some return and error context, but not enough for an agent to invoke this complex tool confidently.

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 only 7% across 14 parameters, so the description bears most of the burden. It mentions project_id and merge_request_iid as generic kwargs examples but omits approval_ref, which the schema calls out as required by every owner-approved tool, as well as the other 11 parameters.

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: 'Approve a specific merge request.' An agent can identify the action without opening the schema. It does not explicitly distinguish this from siblings such as gitlab_unapprove_merge_request or clarify approval versus accepting/merging, so it is not 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 Guidelines2/5

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

The description gives no when-to-use guidance, prerequisites, or alternatives. It only repeats the action, leaving the agent to infer when approval is appropriate versus unapprove, accept, or merge.

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