Skip to main content
Glama

GitLab MCP Code Review

by ffpy

add_merge_request_discussion

Add comments to specific lines in GitLab merge request files to provide targeted feedback during code review.

Instructions

Add a discussion to a merge request at a specific position in a file. Args: project_id: The GitLab project ID or URL-encoded path merge_request_iid: The merge request IID (project-specific ID) body: The discussion text position: Position data for the discussion. Example: { "position_type": "text", // Required, Type of the position reference. Allowed values: text, image, or file. file introduced in GitLab 16.4. "base_sha": "...", // Required, Base commit SHA in the source branch. "start_sha": "...", // Required, SHA referencing commit in target branch. "head_sha": "...", // Required, SHA referencing HEAD of this merge request. "old_path": "path/to/file.py", // Required, File path before change. "new_path": "path/to/file.py", // Required, File path after change. "new_line": 15, // For text diff notes, the line number after change. "old_line": 10 // For text diff notes, the line number before change. } Returns: Dict containing the created discussion information

Input Schema

NameRequiredDescriptionDefault
project_idYes
merge_request_iidYes
bodyYes
positionYes

Input Schema (JSON Schema)

{ "properties": { "body": { "title": "Body", "type": "string" }, "merge_request_iid": { "title": "Merge Request Iid", "type": "string" }, "position": { "additionalProperties": true, "title": "Position", "type": "object" }, "project_id": { "title": "Project Id", "type": "string" } }, "required": [ "project_id", "merge_request_iid", "body", "position" ], "type": "object" }

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