Skip to main content
Glama
ffpy

GitLab MCP Code Review

by ffpy

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
GITLAB_HOSTYesThe GitLab host URL (e.g., gitlab.com)
GITLAB_TOKENYesYour GitLab personal access token with API scopes (read_api, api)

Instructions

Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.

This server publishes no instructions, or was last inspected before Glama recorded them.

Capabilities

Server capabilities have not been inspected yet.

Tools

Functions exposed to the LLM to take actions

NameDescription
fetch_code_review_rulesA
Fetch the team's code review rules from a remote server via SSH.

IMPORTANT: You should call this tool BEFORE reviewing any merge requests or code changes
to understand the team's code review standards and guidelines.

Returns:
    str: The code review rules content on success, or a simple message if SSH is not configured
    Dict: Error information only on connection failures
fetch_merge_requestA
Fetch a GitLab merge request and its contents.

IMPORTANT: You MUST call fetch_code_review_rules BEFORE using this tool to understand 
the team's code review standards and guidelines.

Args:
    project_id: The GitLab project ID or URL-encoded path
    merge_request_iid: The merge request IID (project-specific ID)
Returns:
    XML string containing the merge request information
compare_versionsC
Compare two commits/branches/tags to see the differences between them.

Args:
    project_id: The GitLab project ID or URL-encoded path
    from_sha: The source commit/branch/tag
    to_sha: The target commit/branch/tag
Returns:
    Dict containing the comparison information
add_merge_request_commentB
Add a general comment to a merge request.

Args:
    project_id: The GitLab project ID or URL-encoded path
    merge_request_iid: The merge request IID (project-specific ID)
    body: The comment text
Returns:
    Dict containing the created comment information
add_merge_request_discussionA
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
reply_to_merge_request_discussionC
Reply to a merge request discussion.

Args:
    project_id: The GitLab project ID or URL-encoded path
    merge_request_iid: The merge request IID (project-specific ID)
    discussion_id: The ID of the discussion to reply to
    body: The reply text
Returns:
    Dict containing the created note information
resolve_merge_request_discussionB
Resolve or unresolve a merge request discussion.

Args:
    project_id: The GitLab project ID or URL-encoded path
    merge_request_iid: The merge request IID (project-specific ID)
    discussion_id: The ID of the discussion
    resolved: True to resolve, False to unresolve
Returns:
    Dict containing the updated discussion information
delete_merge_request_discussionC
Delete a merge request discussion.

Args:
    project_id: The GitLab project ID or URL-encoded path
    merge_request_iid: The merge request IID (project-specific ID)
    discussion_id: The ID of the discussion to delete
Returns:
    Dict containing the status of the deletion
approve_merge_requestC
Approve a merge request.

Args:
    project_id: The GitLab project ID or URL-encoded path
    merge_request_iid: The merge request IID (project-specific ID)
    approvals_required: Optional number of required approvals to set
Returns:
    Dict containing the approval information
unapprove_merge_requestB
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
get_project_merge_requestsB
Get all merge requests for a project.

Args:
    project_id: The GitLab project ID or URL-encoded path
    state: Filter merge requests by state (all, opened, closed, merged, or locked)
    limit: Maximum number of merge requests to return
Returns:
    List of merge request objects
search_projectsC
Search for GitLab projects by name.

Args:
    project_name: The name of the project to search for. If None, returns all projects.
Returns:
    A list of projects matching the search criteria.

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

TDQS

A3.5/5.0

Scored across 12 tools

Disambiguation4/5

Most tools have distinct purposes focused on merge request management and code review workflows, with clear boundaries between actions like adding comments, approving, and comparing versions. However, there is some potential overlap between 'add_merge_request_comment' and 'add_merge_request_discussion' as both involve commenting, though the latter is more specific to file positions.

Naming Consistency5/5

Tool names follow a consistent verb_noun pattern throughout, such as 'add_merge_request_comment', 'approve_merge_request', and 'fetch_code_review_rules'. All tools use snake_case and maintain a predictable structure, making them easy to parse and understand.

Tool Count5/5

With 12 tools, the set is well-scoped for a GitLab code review server, covering essential operations like fetching merge requests, managing discussions, approvals, and project searches. Each tool serves a clear purpose without redundancy, fitting the domain appropriately.

Completeness4/5

The toolset provides comprehensive coverage for code review tasks, including fetching rules, listing and fetching merge requests, adding and managing discussions, and handling approvals. A minor gap is the lack of tools for directly modifying merge requests (e.g., updating or merging them), but core review workflows are well-supported.

Maintenance

ActivityInactive
ResponsivenessNo issues