Skip to main content
Glama

MCP GitLab Server

by Vijay-Duke

gitlab_smart_diff

Compare Git refs intelligently, retrieve structured diff hunks with configurable context lines and size limits, and optimize for efficient code reviews. Supports large diffs and auto-detects project details.

Instructions

Retrieve diff between refs with intelligent chunking, configurable context lines, and size limits. Returns structured hunks suitable for code review. Handles large diffs gracefully.

Input Schema

NameRequiredDescriptionDefault
context_linesNoNumber of unchanged lines to show around changes in diff (integer). Default: 3. Range: 0-10
from_refYesSource ref for comparison (string, required). Branch name, tag, or commit SHA to compare from
max_file_sizeNoMaximum file size in bytes to include in diff (integer). Files larger are skipped. Default: 50000 (50KB)
project_idNoProject ID (integer) or path (string like 'group/project'). Optional - auto-detects from current git repository if not provided
to_refYesTarget ref for comparison (string, required). Branch name, tag, or commit SHA to compare to

Input Schema (JSON Schema)

{ "properties": { "context_lines": { "default": 3, "description": "Number of unchanged lines to show around changes in diff (integer). Default: 3. Range: 0-10", "type": "integer" }, "from_ref": { "description": "Source ref for comparison (string, required). Branch name, tag, or commit SHA to compare from", "type": "string" }, "max_file_size": { "default": 50000, "description": "Maximum file size in bytes to include in diff (integer). Files larger are skipped. Default: 50000 (50KB)", "type": "integer" }, "project_id": { "description": "Project ID (integer) or path (string like 'group/project'). Optional - auto-detects from current git repository if not provided", "type": "string" }, "to_ref": { "description": "Target ref for comparison (string, required). Branch name, tag, or commit SHA to compare to", "type": "string" } }, "required": [ "from_ref", "to_ref" ], "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/Vijay-Duke/mcp-gitlab'

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