Skip to main content
Glama

GitLab MCP Code Review

by ffpy

unapprove_merge_request

Remove approval from a GitLab merge request to indicate changes are needed before merging. Use this tool to revoke previous approval when new issues are identified in the code review process.

Instructions

Unapprove a merge request. Args: project_id: The GitLab project ID or URL-encoded path merge_request_iid: The merge request IID (project-specific ID) Returns: Dict containing the unapproval information

Input Schema

NameRequiredDescriptionDefault
project_idYes
merge_request_iidYes

Input Schema (JSON Schema)

{ "properties": { "merge_request_iid": { "title": "Merge Request Iid", "type": "string" }, "project_id": { "title": "Project Id", "type": "string" } }, "required": [ "project_id", "merge_request_iid" ], "type": "object" }

Implementation Reference

  • Handler function that unapproves a GitLab merge request by calling mr.unapprove() and returns the MR details.
    def unapprove_merge_request(ctx: Context, project_id: str, merge_request_iid: str) -> Dict[str, Any]: """ Unapprove a merge request. Args: project_id: The GitLab project ID or URL-encoded path merge_request_iid: The merge request IID (project-specific ID) Returns: Dict containing the unapproval information """ gl = ctx.request_context.lifespan_context project = gl.projects.get(project_id) mr = project.mergerequests.get(merge_request_iid) try: mr.unapprove() except Exception as e: logger.error(f"Failed to unapprove merge request {merge_request_iid}: {e}") return mr.asdict()

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/ffpy/gitlab-mcp-code-review'

If you have feedback or need assistance with the MCP directory API, please join our Discord server