Skip to main content
Glama

gitlab_get_user_review_requests

Retrieve pending merge requests requiring your review from GitLab, displaying MR details, review status, priority indicators, and action items for efficient code review management.

Instructions

Get MRs where user is assigned as reviewer with pending action

Find all merge requests where the specified user has been assigned as a reviewer and their review/approval is still pending.

Returns pending review requests with:

  • MR details: title, author, description

  • Review status: approvals, pending reviewers

  • Priority indicators: age, CI status, conflicts

  • Action items: what review is needed

  • Project context: urgency, team notifications

Use cases:

  • Personal review queue/inbox

  • Team code review management

  • Review workload balancing

  • SLA compliance monitoring

Parameters:

  • user_id: Numeric user ID

  • username: Username string (use either user_id or username)

  • priority: Filter by priority (high, medium, low)

  • sort: Sort order (urgency, age, project)

  • per_page: Results per page (default: 20)

  • page: Page number (default: 1)

Example: Get high priority review requests

{
  "username": "johndoe",
  "priority": "high",
  "sort": "urgency"
}

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
user_idNoNumeric user ID
usernameNoUsername string
priorityNoFilter by priority
sortNoSort orderurgency
per_pageNoNumber of results per page Type: integer Range: 1-100 Default: 20 Example: 50 (for faster browsing) Tip: Use smaller values (10-20) for detailed operations, larger (50-100) for listing
pageNoPage number for pagination Type: integer Range: ≥1 Default: 1 Example: 3 (to get the third page of results) Note: Use with per_page to navigate large result sets

Implementation Reference

  • Handler function that executes the gitlab_get_user_review_requests tool logic. Extracts parameters from arguments and delegates to GitLabClient.get_user_review_requests()
    def handle_get_user_review_requests(client: GitLabClient, arguments: Optional[Dict[str, Any]]) -> Dict[str, Any]:
        """Handle getting user's pending review requests"""
        user_id = get_argument(arguments, "user_id")
        username = get_argument(arguments, "username")
        priority = get_argument(arguments, "priority")
        sort = get_argument(arguments, "sort", "urgency")
        per_page = get_argument(arguments, "per_page", DEFAULT_PAGE_SIZE)
        page = get_argument(arguments, "page", 1)
        
        return client.get_user_review_requests(
            user_id=user_id,
            username=username,
            priority=priority,
            sort=sort,
            per_page=per_page,
            page=page
        )
  • Tool schema definition including inputSchema with parameters like username (required), state, per_page, page.
    types.Tool(
        name=TOOL_GET_USER_REVIEW_REQUESTS,
        description=desc.DESC_GET_USER_REVIEW_REQUESTS,
        inputSchema={
            "type": "object",
            "properties": {
                "username": {"type": "string", "description": "Username string"},
                "state": {"type": "string", "description": "Merge request state", "enum": ["opened", "closed", "locked", "merged"], "default": "opened"},
                "per_page": {"type": "integer", "description": desc.DESC_PER_PAGE, "default": DEFAULT_PAGE_SIZE, "minimum": 1, "maximum": MAX_PAGE_SIZE},
                "page": {"type": "integer", "description": desc.DESC_PAGE_NUMBER, "default": 1, "minimum": 1}
            },
            "required": ["username"]
        }
  • Registration of the tool handler in the TOOL_HANDLERS dictionary used by the MCP server to dispatch tool calls.
    TOOL_GET_USER_REVIEW_REQUESTS: handle_get_user_review_requests,
  • Tool definitions list (TOOLS) that includes this tool, imported into server.py for @server.list_tools()
    from .constants import *
    
    
    TOOLS: List[types.Tool] = [
        # Project Management
        types.Tool(
            name=TOOL_LIST_PROJECTS,
            description=desc.DESC_LIST_PROJECTS,
            inputSchema={
                "type": "object",
                "properties": {
                    "owned": {"type": "boolean", "description": desc.DESC_OWNED_PROJECTS, "default": False},
                    "search": {"type": "string", "description": desc.DESC_SEARCH_TERM + " for projects"},
                    "per_page": {"type": "integer", "description": desc.DESC_PER_PAGE, "default": DEFAULT_PAGE_SIZE, "minimum": 1, "maximum": MAX_PAGE_SIZE},
                    "page": {"type": "integer", "description": desc.DESC_PAGE_NUMBER, "default": 1, "minimum": 1}
                }
            }
        ),
        types.Tool(
            name=TOOL_GET_PROJECT,
            description=desc.DESC_GET_PROJECT,
            inputSchema={
                "type": "object",
                "properties": {
                    "project_id": {"type": "string", "description": desc.DESC_PROJECT_ID_REQUIRED}
                },
                "required": ["project_id"]
            }
        ),
        types.Tool(
            name=TOOL_GET_CURRENT_PROJECT,
            description=desc.DESC_GET_CURRENT_PROJECT,
            inputSchema={
                "type": "object",
                "properties": {
                    "path": {"type": "string", "description": desc.DESC_GIT_PATH}
                }
            }
        ),
    
        # Authentication & User Info
        types.Tool(
            name=TOOL_GET_CURRENT_USER,
            description=desc.DESC_GET_CURRENT_USER,
            inputSchema={
                "type": "object",
                "properties": {}
            }
        ),
        types.Tool(
            name=TOOL_GET_USER,
            description=desc.DESC_GET_USER,
            inputSchema={
                "type": "object",
                "properties": {
                    "user_id": {"type": "integer", "description": desc.DESC_USER_ID},
                    "username": {"type": "string", "description": desc.DESC_USERNAME}
                }
            }
        ),
    
        # Group Management
        types.Tool(
            name=TOOL_LIST_GROUPS,
            description=desc.DESC_LIST_GROUPS,
            inputSchema={
                "type": "object",
                "properties": {
                    "search": {"type": "string", "description": desc.DESC_SEARCH_TERM + " for groups"},
                    "owned": {"type": "boolean", "description": desc.DESC_OWNED_GROUPS, "default": False},
                    "per_page": {"type": "integer", "description": desc.DESC_PER_PAGE, "default": DEFAULT_PAGE_SIZE, "minimum": 1, "maximum": MAX_PAGE_SIZE},
                    "page": {"type": "integer", "description": desc.DESC_PAGE_NUMBER, "default": 1, "minimum": 1}
                }
            }
        ),
        types.Tool(
            name=TOOL_GET_GROUP,
            description=desc.DESC_GET_GROUP,
            inputSchema={
                "type": "object",
                "properties": {
                    "group_id": {"type": "string", "description": desc.DESC_GROUP_ID},
                    "with_projects": {"type": "boolean", "description": desc.DESC_WITH_PROJECTS, "default": False}
                },
                "required": ["group_id"]
            }
        ),
        types.Tool(
            name=TOOL_LIST_GROUP_PROJECTS,
            description=desc.DESC_LIST_GROUP_PROJECTS,
            inputSchema={
                "type": "object",
                "properties": {
                    "group_id": {"type": "string", "description": desc.DESC_GROUP_ID},
                    "search": {"type": "string", "description": desc.DESC_SEARCH_TERM + " for projects"},
                    "include_subgroups": {"type": "boolean", "description": desc.DESC_INCLUDE_SUBGROUPS, "default": False},
                    "per_page": {"type": "integer", "description": desc.DESC_PER_PAGE, "default": DEFAULT_PAGE_SIZE, "minimum": 1, "maximum": MAX_PAGE_SIZE},
                    "page": {"type": "integer", "description": desc.DESC_PAGE_NUMBER, "default": 1, "minimum": 1}
                },
                "required": ["group_id"]
            }
        ),
    
        # Issues
        types.Tool(
            name=TOOL_LIST_ISSUES,
            description=desc.DESC_LIST_ISSUES,
            inputSchema={
                "type": "object",
                "properties": {
                    "project_id": {"type": "string", "description": desc.DESC_PROJECT_ID},
                    "state": {"type": "string", "description": desc.DESC_STATE_ISSUE, "enum": ["opened", "closed", "all"], "default": "opened"},
                    "per_page": {"type": "integer", "description": desc.DESC_PER_PAGE, "default": DEFAULT_PAGE_SIZE, "minimum": 1, "maximum": MAX_PAGE_SIZE},
                    "page": {"type": "integer", "description": desc.DESC_PAGE_NUMBER, "default": 1, "minimum": 1}
                }
            }
        ),
        types.Tool(
            name=TOOL_GET_ISSUE,
            description=desc.DESC_GET_ISSUE,
            inputSchema={
                "type": "object",
                "properties": {
                    "project_id": {"type": "string", "description": desc.DESC_PROJECT_ID},
                    "issue_iid": {"type": "integer", "description": desc.DESC_ISSUE_IID}
                },
                "required": ["issue_iid"]
            }
        ),
    
        # Merge Requests
        types.Tool(
            name=TOOL_LIST_MRS,
            description=desc.DESC_LIST_MRS,
            inputSchema={
                "type": "object",
                "properties": {
                    "project_id": {"type": "string", "description": desc.DESC_PROJECT_ID},
                    "state": {"type": "string", "description": desc.DESC_STATE_MR, "enum": ["opened", "closed", "merged", "all"], "default": "opened"},
                    "per_page": {"type": "integer", "description": desc.DESC_PER_PAGE, "default": DEFAULT_PAGE_SIZE, "minimum": 1, "maximum": MAX_PAGE_SIZE},
                    "page": {"type": "integer", "description": desc.DESC_PAGE_NUMBER, "default": 1, "minimum": 1}
                }
            }
        ),
        types.Tool(
            name=TOOL_GET_MERGE_REQUEST,
            description=desc.DESC_GET_MR,
            inputSchema={
                "type": "object",
                "properties": {
                    "project_id": {"type": "string", "description": desc.DESC_PROJECT_ID},
                    "mr_iid": {"type": "integer", "description": desc.DESC_MR_IID}
                },
                "required": ["mr_iid"]
            }
        ),
        types.Tool(
            name=TOOL_GET_MR_NOTES,
            description=desc.DESC_GET_MR_NOTES,
            inputSchema={
                "type": "object",
                "properties": {
                    "project_id": {"type": "string", "description": desc.DESC_PROJECT_ID},
                    "mr_iid": {"type": "integer", "description": desc.DESC_MR_IID},
                    "per_page": {"type": "integer", "description": desc.DESC_PER_PAGE, "default": SMALL_PAGE_SIZE, "minimum": 1, "maximum": MAX_PAGE_SIZE},
                    "page": {"type": "integer", "description": desc.DESC_PAGE_NUMBER, "default": 1, "minimum": 1},
                    "sort": {"type": "string", "description": desc.DESC_SORT_ORDER, "enum": ["asc", "desc"], "default": "asc"},
                    "order_by": {"type": "string", "description": desc.DESC_ORDER_BY, "enum": ["created_at", "updated_at"], "default": "created_at"},
                    "max_body_length": {"type": "integer", "description": desc.DESC_MAX_BODY_LENGTH, "default": DEFAULT_MAX_BODY_LENGTH, "minimum": 0}
                },
                "required": ["mr_iid"]
            }
        ),
    
        # Repository Files
        types.Tool(
            name=TOOL_GET_FILE_CONTENT,
            description=desc.DESC_GET_FILE_CONTENT,
            inputSchema={
                "type": "object",
                "properties": {
                    "project_id": {"type": "string", "description": desc.DESC_PROJECT_ID},
                    "file_path": {"type": "string", "description": desc.DESC_FILE_PATH},
                    "ref": {"type": "string", "description": desc.DESC_REF}
                },
                "required": ["file_path"]
            }
        ),
        types.Tool(
            name=TOOL_LIST_REPOSITORY_TREE,
            description=desc.DESC_LIST_TREE,
            inputSchema={
                "type": "object",
                "properties": {
                    "project_id": {"type": "string", "description": desc.DESC_PROJECT_ID},
                    "path": {"type": "string", "description": desc.DESC_TREE_PATH, "default": ""},
                    "ref": {"type": "string", "description": desc.DESC_REF},
                    "recursive": {"type": "boolean", "description": desc.DESC_RECURSIVE, "default": False}
                }
            }
        ),
    
        # Snippets
        types.Tool(
            name=TOOL_LIST_SNIPPETS,
            description=desc.DESC_LIST_SNIPPETS,
            inputSchema={
                "type": "object",
                "properties": {
                    "project_id": {"type": "string", "description": desc.DESC_PROJECT_ID},
                    "per_page": {"type": "integer", "description": desc.DESC_PER_PAGE, "default": DEFAULT_PAGE_SIZE, "minimum": 1, "maximum": MAX_PAGE_SIZE},
                    "page": {"type": "integer", "description": desc.DESC_PAGE_NUMBER, "default": 1, "minimum": 1}
                }
            }
        ),
        types.Tool(
            name=TOOL_GET_SNIPPET,
            description=desc.DESC_GET_SNIPPET,
            inputSchema={
                "type": "object",
                "properties": {
                    "project_id": {"type": "string", "description": desc.DESC_PROJECT_ID},
                    "snippet_id": {"type": "integer", "description": desc.DESC_SNIPPET_ID}
                },
                "required": ["snippet_id"]
            }
        ),
        types.Tool(
            name=TOOL_CREATE_SNIPPET,
            description=desc.DESC_CREATE_SNIPPET,
            inputSchema={
                "type": "object",
                "properties": {
                    "project_id": {"type": "string", "description": desc.DESC_PROJECT_ID},
                    "title": {"type": "string", "description": desc.DESC_SNIPPET_TITLE},
                    "file_name": {"type": "string", "description": desc.DESC_SNIPPET_FILE_NAME},
                    "content": {"type": "string", "description": desc.DESC_SNIPPET_CONTENT},
                    "description": {"type": "string", "description": desc.DESC_SNIPPET_DESCRIPTION},
                    "visibility": {"type": "string", "description": desc.DESC_SNIPPET_VISIBILITY, "enum": ["private", "internal", "public"], "default": "private"}
                },
                "required": ["title", "file_name", "content"]
            }
        ),
        types.Tool(
            name=TOOL_UPDATE_SNIPPET,
            description=desc.DESC_UPDATE_SNIPPET,
            inputSchema={
                "type": "object",
                "properties": {
                    "project_id": {"type": "string", "description": desc.DESC_PROJECT_ID},
                    "snippet_id": {"type": "integer", "description": desc.DESC_SNIPPET_ID},
                    "title": {"type": "string", "description": desc.DESC_SNIPPET_TITLE},
                    "file_name": {"type": "string", "description": desc.DESC_SNIPPET_FILE_NAME},
                    "content": {"type": "string", "description": desc.DESC_SNIPPET_CONTENT},
                    "description": {"type": "string", "description": desc.DESC_SNIPPET_DESCRIPTION},
                    "visibility": {"type": "string", "description": desc.DESC_SNIPPET_VISIBILITY, "enum": ["private", "internal", "public"]}
                },
                "required": ["snippet_id"]
            }
        ),
    
        # Commits
        types.Tool(
            name=TOOL_LIST_COMMITS,
            description=desc.DESC_LIST_COMMITS,
            inputSchema={
                "type": "object",
                "properties": {
                    "project_id": {"type": "string", "description": desc.DESC_PROJECT_ID},
                    "ref_name": {"type": "string", "description": desc.DESC_REF.replace("commit SHA", "tag name")},
                    "since": {"type": "string", "description": desc.DESC_DATE_SINCE},
                    "until": {"type": "string", "description": desc.DESC_DATE_UNTIL},
                    "path": {"type": "string", "description": desc.DESC_PATH_FILTER},
                    "per_page": {"type": "integer", "description": desc.DESC_PER_PAGE, "default": DEFAULT_PAGE_SIZE, "minimum": 1, "maximum": MAX_PAGE_SIZE},
                    "page": {"type": "integer", "description": desc.DESC_PAGE_NUMBER, "default": 1, "minimum": 1}
                }
            }
        ),
        types.Tool(
            name=TOOL_GET_COMMIT,
            description=desc.DESC_GET_COMMIT,
            inputSchema={
                "type": "object",
                "properties": {
                    "project_id": {"type": "string", "description": desc.DESC_PROJECT_ID},
                    "commit_sha": {"type": "string", "description": desc.DESC_COMMIT_SHA},
                    "include_stats": {"type": "boolean", "description": desc.DESC_INCLUDE_STATS, "default": False}
                },
                "required": ["commit_sha"]
            }
        ),
        types.Tool(
            name=TOOL_GET_COMMIT_DIFF,
            description=desc.DESC_GET_COMMIT_DIFF,
            inputSchema={
                "type": "object",
                "properties": {
                    "project_id": {"type": "string", "description": desc.DESC_PROJECT_ID},
                    "commit_sha": {"type": "string", "description": "Commit SHA"}
                },
                "required": ["commit_sha"]
            }
        ),
    
        # Search
        types.Tool(
            name=TOOL_SEARCH_PROJECTS,
            description=desc.DESC_SEARCH_PROJECTS,
            inputSchema={
                "type": "object",
                "properties": {
                    "search": {"type": "string", "description": desc.DESC_SEARCH_TERM},
                    "per_page": {"type": "integer", "description": desc.DESC_PER_PAGE, "default": DEFAULT_PAGE_SIZE, "minimum": 1, "maximum": MAX_PAGE_SIZE},
                    "page": {"type": "integer", "description": desc.DESC_PAGE_NUMBER, "default": 1, "minimum": 1}
                },
                "required": ["search"]
            }
        ),
        types.Tool(
            name=TOOL_SEARCH_IN_PROJECT,
            description=desc.DESC_SEARCH_IN_PROJECT,
            inputSchema={
                "type": "object",
                "properties": {
                    "project_id": {"type": "string", "description": desc.DESC_PROJECT_ID},
                    "scope": {"type": "string", "description": desc.DESC_SEARCH_SCOPE, "enum": ["issues", "merge_requests", "milestones", "notes", "wiki_blobs", "commits", "blobs"]},
                    "search": {"type": "string", "description": desc.DESC_SEARCH_TERM},
                    "per_page": {"type": "integer", "description": desc.DESC_PER_PAGE, "default": DEFAULT_PAGE_SIZE, "minimum": 1, "maximum": MAX_PAGE_SIZE},
                    "page": {"type": "integer", "description": desc.DESC_PAGE_NUMBER, "default": 1, "minimum": 1}
                },
                "required": ["scope", "search"]
            }
        ),
    
        # Repository Info
        types.Tool(
            name=TOOL_LIST_BRANCHES,
            description=desc.DESC_LIST_BRANCHES,
            inputSchema={
                "type": "object",
                "properties": {
                    "project_id": {"type": "string", "description": "Project ID or path (optional - auto-detects from git)"}
                }
            }
        ),
        types.Tool(
            name=TOOL_LIST_PIPELINES,
            description=desc.DESC_LIST_PIPELINES,
            inputSchema={
                "type": "object",
                "properties": {
                    "project_id": {"type": "string", "description": desc.DESC_PROJECT_ID},
                    "ref": {"type": "string", "description": desc.DESC_BRANCH_TAG_REF}
                }
            }
        ),
    
        # User Events
        types.Tool(
            name=TOOL_LIST_USER_EVENTS,
            description=desc.DESC_LIST_USER_EVENTS,
            inputSchema={
                "type": "object",
                "properties": {
                    "username": {"type": "string", "description": desc.DESC_USERNAME},
                    "action": {"type": "string", "description": desc.DESC_ACTION_FILTER, "enum": ["commented", "pushed", "created", "closed", "opened", "merged", "joined", "left", "destroyed", "expired", "removed", "deleted", "approved", "updated", "uploaded", "downloaded"]},
                    "target_type": {"type": "string", "description": desc.DESC_TARGET_TYPE_FILTER, "enum": ["Note", "Issue", "MergeRequest", "Commit", "Project", "Snippet", "User", "WikiPage", "Milestone", "Discussion", "DiffNote"]},
                    "per_page": {"type": "integer", "description": desc.DESC_PER_PAGE, "default": DEFAULT_PAGE_SIZE, "minimum": 1, "maximum": MAX_PAGE_SIZE},
                    "page": {"type": "integer", "description": desc.DESC_PAGE_NUMBER, "default": 1, "minimum": 1},
                    "after": {"type": "string", "description": desc.DESC_DATE_AFTER},
                    "before": {"type": "string", "description": desc.DESC_DATE_BEFORE}
                },
                "required": ["username"]
            }
        ),
    
        # MR Lifecycle Tools
        types.Tool(
            name=TOOL_UPDATE_MR,
            description=desc.DESC_UPDATE_MR,
            inputSchema={
                "type": "object",
                "properties": {
                    "project_id": {"type": "string", "description": desc.DESC_PROJECT_ID},
                    "mr_iid": {"type": "integer", "description": desc.DESC_MR_IID},
                    "title": {"type": "string", "description": desc.DESC_TITLE},
                    "description": {"type": "string", "description": desc.DESC_DESCRIPTION},
                    "assignee_id": {"type": "integer", "description": desc.DESC_ASSIGNEE_ID},
                    "assignee_ids": {"type": "array", "items": {"type": "integer"}, "description": desc.DESC_ASSIGNEE_IDS},
                    "reviewer_ids": {"type": "array", "items": {"type": "integer"}, "description": desc.DESC_REVIEWER_IDS},
                    "labels": {"type": "string", "description": desc.DESC_LABELS},
                    "milestone_id": {"type": "integer", "description": desc.DESC_MILESTONE_ID},
                    "state_event": {"type": "string", "description": desc.DESC_STATE_EVENT, "enum": ["close", "reopen"]},
                    "remove_source_branch": {"type": "boolean", "description": desc.DESC_REMOVE_SOURCE_BRANCH},
                    "squash": {"type": "boolean", "description": desc.DESC_SQUASH},
                    "discussion_locked": {"type": "boolean", "description": desc.DESC_DISCUSSION_LOCKED},
                    "allow_collaboration": {"type": "boolean", "description": desc.DESC_ALLOW_COLLABORATION},
                    "target_branch": {"type": "string", "description": desc.DESC_TARGET_BRANCH}
                },
                "required": ["mr_iid"]
            }
        ),
        types.Tool(
            name=TOOL_CLOSE_MR,
            description=desc.DESC_CLOSE_MR,
            inputSchema={
                "type": "object",
                "properties": {
                    "project_id": {"type": "string", "description": desc.DESC_PROJECT_ID},
                    "mr_iid": {"type": "integer", "description": desc.DESC_MR_IID}
                },
                "required": ["mr_iid"]
            }
        ),
        types.Tool(
            name=TOOL_MERGE_MR,
            description=desc.DESC_MERGE_MR,
            inputSchema={
                "type": "object",
                "properties": {
                    "project_id": {"type": "string", "description": desc.DESC_PROJECT_ID},
                    "mr_iid": {"type": "integer", "description": desc.DESC_MR_IID},
                    "merge_when_pipeline_succeeds": {"type": "boolean", "description": desc.DESC_MERGE_WHEN_PIPELINE_SUCCEEDS, "default": False},
                    "should_remove_source_branch": {"type": "boolean", "description": desc.DESC_REMOVE_SOURCE_BRANCH},
                    "merge_commit_message": {"type": "string", "description": desc.DESC_MERGE_COMMIT_MESSAGE},
                    "squash_commit_message": {"type": "string", "description": desc.DESC_SQUASH_COMMIT_MESSAGE},
                    "squash": {"type": "boolean", "description": desc.DESC_SQUASH}
                },
                "required": ["mr_iid"]
            }
        ),
    
        # Comment Tools
        types.Tool(
            name=TOOL_ADD_ISSUE_COMMENT,
            description=desc.DESC_ADD_ISSUE_COMMENT,
            inputSchema={
                "type": "object",
                "properties": {
                    "project_id": {"type": "string", "description": desc.DESC_PROJECT_ID},
                    "issue_iid": {"type": "integer", "description": desc.DESC_ISSUE_IID},
                    "body": {"type": "string", "description": desc.DESC_COMMENT_BODY}
                },
                "required": ["issue_iid", "body"]
            }
        ),
        types.Tool(
            name=TOOL_ADD_MR_COMMENT,
            description=desc.DESC_ADD_MR_COMMENT,
            inputSchema={
                "type": "object",
                "properties": {
                    "project_id": {"type": "string", "description": desc.DESC_PROJECT_ID},
                    "mr_iid": {"type": "integer", "description": desc.DESC_MR_IID},
                    "body": {"type": "string", "description": desc.DESC_COMMENT_BODY}
                },
                "required": ["mr_iid", "body"]
            }
        ),
    
        # Approval Tools
        types.Tool(
            name=TOOL_APPROVE_MR,
            description=desc.DESC_APPROVE_MR,
            inputSchema={
                "type": "object",
                "properties": {
                    "project_id": {"type": "string", "description": desc.DESC_PROJECT_ID},
                    "mr_iid": {"type": "integer", "description": desc.DESC_MR_IID}
                },
                "required": ["mr_iid"]
            }
        ),
        types.Tool(
            name=TOOL_GET_MR_APPROVALS,
            description=desc.DESC_GET_MR_APPROVALS,
            inputSchema={
                "type": "object",
                "properties": {
                    "project_id": {"type": "string", "description": desc.DESC_PROJECT_ID},
                    "mr_iid": {"type": "integer", "description": desc.DESC_MR_IID}
                },
                "required": ["mr_iid"]
            }
        ),
    
        # Repository Tools
        types.Tool(
            name=TOOL_LIST_TAGS,
            description=desc.DESC_LIST_TAGS,
            inputSchema={
                "type": "object",
                "properties": {
                    "project_id": {"type": "string", "description": desc.DESC_PROJECT_ID},
                    "order_by": {"type": "string", "description": desc.DESC_ORDER_BY_TAG, "enum": ["name", "updated", "version", "semver"], "default": "updated"},
                    "sort": {"type": "string", "description": desc.DESC_SORT_ORDER, "enum": ["asc", "desc"], "default": "desc"}
                }
            }
        ),
        types.Tool(
            name=TOOL_CREATE_COMMIT,
            description=desc.DESC_CREATE_COMMIT,
            inputSchema={
                "type": "object",
                "properties": {
                    "project_id": {"type": "string", "description": desc.DESC_PROJECT_ID},
                    "branch": {"type": "string", "description": desc.DESC_BRANCH},
                    "commit_message": {"type": "string", "description": desc.DESC_COMMIT_MESSAGE},
                    "actions": {
                        "type": "array",
                        "description": desc.DESC_ACTIONS,
                        "items": {
                            "type": "object",
                            "properties": {
                                "action": {"type": "string", "enum": ["create", "update", "delete", "move"]},
                                "file_path": {"type": "string"},
                                "content": {"type": "string"},
                                "previous_path": {"type": "string"},
                                "encoding": {"type": "string", "enum": ["text", "base64"], "default": "text"}
                            },
                            "required": ["action", "file_path"]
                        }
                    },
                    "author_email": {"type": "string", "description": desc.DESC_AUTHOR_EMAIL},
                    "author_name": {"type": "string", "description": desc.DESC_AUTHOR_NAME}
                },
                "required": ["branch", "commit_message", "actions"]
            }
        ),
        types.Tool(
            name=TOOL_COMPARE_REFS,
            description=desc.DESC_COMPARE_REFS,
            inputSchema={
                "type": "object",
                "properties": {
                    "project_id": {"type": "string", "description": desc.DESC_PROJECT_ID},
                    "from_ref": {"type": "string", "description": desc.DESC_FROM_REF},
                    "to_ref": {"type": "string", "description": desc.DESC_TO_REF},
                    "straight": {"type": "boolean", "description": desc.DESC_STRAIGHT, "default": False}
                },
                "required": ["from_ref", "to_ref"]
            }
        ),
    
        # Release and Member Tools
        types.Tool(
            name=TOOL_LIST_RELEASES,
            description=desc.DESC_LIST_RELEASES,
            inputSchema={
                "type": "object",
                "properties": {
                    "project_id": {"type": "string", "description": desc.DESC_PROJECT_ID},
                    "order_by": {"type": "string", "description": desc.DESC_ORDER_BY, "enum": ["released_at", "created_at"], "default": "released_at"},
                    "sort": {"type": "string", "description": desc.DESC_SORT_ORDER, "enum": ["asc", "desc"], "default": "desc"},
                    "per_page": {"type": "integer", "description": desc.DESC_PER_PAGE, "default": DEFAULT_PAGE_SIZE, "minimum": 1, "maximum": MAX_PAGE_SIZE},
                    "page": {"type": "integer", "description": desc.DESC_PAGE_NUMBER, "default": 1, "minimum": 1}
                }
            }
        ),
        types.Tool(
            name=TOOL_LIST_PROJECT_MEMBERS,
            description=desc.DESC_LIST_PROJECT_MEMBERS,
            inputSchema={
                "type": "object",
                "properties": {
                    "project_id": {"type": "string", "description": desc.DESC_PROJECT_ID},
                    "query": {"type": "string", "description": desc.DESC_QUERY},
                    "per_page": {"type": "integer", "description": desc.DESC_PER_PAGE, "default": DEFAULT_PAGE_SIZE, "minimum": 1, "maximum": MAX_PAGE_SIZE},
                    "page": {"type": "integer", "description": desc.DESC_PAGE_NUMBER, "default": 1, "minimum": 1}
                }
            }
        ),
        types.Tool(
            name=TOOL_LIST_PROJECT_HOOKS,
            description=desc.DESC_LIST_PROJECT_HOOKS,
            inputSchema={
                "type": "object",
                "properties": {
                    "project_id": {"type": "string", "description": desc.DESC_PROJECT_ID}
                }
            }
        ),
    
        # MR Advanced Tools
        types.Tool(
            name=TOOL_GET_MR_DISCUSSIONS,
            description=desc.DESC_GET_MR_DISCUSSIONS,
            inputSchema={
                "type": "object",
                "properties": {
                    "project_id": {"type": "string", "description": desc.DESC_PROJECT_ID},
                    "mr_iid": {"type": "integer", "description": desc.DESC_MR_IID},
                    "per_page": {"type": "integer", "description": desc.DESC_PER_PAGE, "default": DEFAULT_PAGE_SIZE, "minimum": 1, "maximum": MAX_PAGE_SIZE},
                    "page": {"type": "integer", "description": desc.DESC_PAGE_NUMBER, "default": 1, "minimum": 1}
                },
                "required": ["mr_iid"]
            }
        ),
        types.Tool(
            name=TOOL_RESOLVE_DISCUSSION,
            description=desc.DESC_RESOLVE_DISCUSSION,
            inputSchema={
                "type": "object",
                "properties": {
                    "project_id": {"type": "string", "description": desc.DESC_PROJECT_ID},
                    "mr_iid": {"type": "integer", "description": desc.DESC_MR_IID},
                    "discussion_id": {"type": "string", "description": desc.DESC_DISCUSSION_ID}
                },
                "required": ["mr_iid", "discussion_id"]
            }
        ),
        types.Tool(
            name=TOOL_GET_MR_CHANGES,
            description=desc.DESC_GET_MR_CHANGES,
            inputSchema={
                "type": "object",
                "properties": {
                    "project_id": {"type": "string", "description": desc.DESC_PROJECT_ID},
                    "mr_iid": {"type": "integer", "description": desc.DESC_MR_IID}
                },
                "required": ["mr_iid"]
            }
        ),
    
        # MR Operations Tools
        types.Tool(
            name=TOOL_REBASE_MR,
            description=desc.DESC_REBASE_MR,
            inputSchema={
                "type": "object",
                "properties": {
                    "project_id": {"type": "string", "description": desc.DESC_PROJECT_ID},
                    "mr_iid": {"type": "integer", "description": desc.DESC_MR_IID}
                },
                "required": ["mr_iid"]
            }
        ),
        types.Tool(
            name=TOOL_CHERRY_PICK_COMMIT,
            description=desc.DESC_CHERRY_PICK,
            inputSchema={
                "type": "object",
                "properties": {
                    "project_id": {"type": "string", "description": desc.DESC_PROJECT_ID},
                    "commit_sha": {"type": "string", "description": desc.DESC_COMMIT_SHA},
                    "branch": {"type": "string", "description": desc.DESC_BRANCH}
                },
                "required": ["commit_sha", "branch"]
            }
        ),
    
        # AI Helper Tools
        types.Tool(
            name=TOOL_SUMMARIZE_MR,
            description=desc.DESC_SUMMARIZE_MR,
            inputSchema={
                "type": "object",
                "properties": {
                    "project_id": {"type": "string", "description": desc.DESC_PROJECT_ID},
                    "mr_iid": {"type": "integer", "description": desc.DESC_MR_IID},
                    "max_length": {"type": "integer", "description": desc.DESC_MAX_LENGTH, "default": 500}
                },
                "required": ["mr_iid"]
            }
        ),
        types.Tool(
            name=TOOL_SUMMARIZE_ISSUE,
            description=desc.DESC_SUMMARIZE_ISSUE,
            inputSchema={
                "type": "object",
                "properties": {
                    "project_id": {"type": "string", "description": desc.DESC_PROJECT_ID},
                    "issue_iid": {"type": "integer", "description": desc.DESC_ISSUE_IID},
                    "max_length": {"type": "integer", "description": desc.DESC_MAX_LENGTH, "default": 500}
                },
                "required": ["issue_iid"]
            }
        ),
        types.Tool(
            name=TOOL_SUMMARIZE_PIPELINE,
            description=desc.DESC_SUMMARIZE_PIPELINE,
            inputSchema={
                "type": "object",
                "properties": {
                    "project_id": {"type": "string", "description": desc.DESC_PROJECT_ID},
                    "pipeline_id": {"type": "integer", "description": desc.DESC_PIPELINE_ID},
                    "max_length": {"type": "integer", "description": desc.DESC_MAX_LENGTH, "default": 500}
                },
                "required": ["pipeline_id"]
            }
        ),
    
        # Advanced Diff Tools
        types.Tool(
            name=TOOL_SMART_DIFF,
            description=desc.DESC_SMART_DIFF,
            inputSchema={
                "type": "object",
                "properties": {
                    "project_id": {"type": "string", "description": desc.DESC_PROJECT_ID},
                    "from_ref": {"type": "string", "description": desc.DESC_FROM_REF},
                    "to_ref": {"type": "string", "description": desc.DESC_TO_REF},
                    "context_lines": {"type": "integer", "description": desc.DESC_CONTEXT_LINES, "default": 3},
                    "max_file_size": {"type": "integer", "description": desc.DESC_MAX_FILE_SIZE, "default": 50000}
                },
                "required": ["from_ref", "to_ref"]
            }
        ),
        types.Tool(
            name=TOOL_SAFE_PREVIEW_COMMIT,
            description=desc.DESC_SAFE_PREVIEW_COMMIT,
            inputSchema={
                "type": "object",
                "properties": {
                    "project_id": {"type": "string", "description": desc.DESC_PROJECT_ID},
                    "branch": {"type": "string", "description": desc.DESC_BRANCH},
                    "commit_message": {"type": "string", "description": desc.DESC_COMMIT_MESSAGE},
                    "actions": {
                        "type": "array",
                        "description": desc.DESC_ACTIONS,
                        "items": {
                            "type": "object",
                            "properties": {
                                "action": {"type": "string", "enum": ["create", "update", "delete", "move"]},
                                "file_path": {"type": "string"},
                                "content": {"type": "string"},
                                "previous_path": {"type": "string"},
                                "encoding": {"type": "string", "enum": ["text", "base64"], "default": "text"}
                            },
                            "required": ["action", "file_path"]
                        }
                    }
                },
                "required": ["branch", "commit_message", "actions"]
            }
        ),
    
        # Batch Operations Tool
        types.Tool(
            name=TOOL_BATCH_OPERATIONS,
            description=desc.DESC_BATCH_OPERATIONS,
            inputSchema={
                "type": "object",
                "properties": {
                    "project_id": {"type": "string", "description": desc.DESC_PROJECT_ID},
                    "operations": {
                        "type": "array",
                        "description": desc.DESC_OPERATIONS,
                        "items": {
                            "type": "object",
                            "properties": {
                                "name": {"type": "string", "description": "Operation name for reference"},
                                "tool": {"type": "string", "description": "GitLab tool name to execute"},
                                "arguments": {"type": "object", "description": "Arguments for the tool"}
                            },
                            "required": ["name", "tool", "arguments"]
                        }
                    },
                    "stop_on_error": {"type": "boolean", "description": desc.DESC_STOP_ON_ERROR, "default": True}
                },
                "required": ["operations"]
            }
        ),
    
        # Job and Artifact Tools
        types.Tool(
            name=TOOL_LIST_PIPELINE_JOBS,
            description=desc.DESC_LIST_PIPELINE_JOBS,
            inputSchema={
                "type": "object",
                "properties": {
                    "project_id": {"type": "string", "description": desc.DESC_PROJECT_ID},
                    "pipeline_id": {"type": "integer", "description": desc.DESC_PIPELINE_ID},
                    "per_page": {"type": "integer", "description": desc.DESC_PER_PAGE, "default": DEFAULT_PAGE_SIZE, "minimum": 1, "maximum": MAX_PAGE_SIZE},
                    "page": {"type": "integer", "description": desc.DESC_PAGE_NUMBER, "default": 1, "minimum": 1}
                },
                "required": ["pipeline_id"]
            }
        ),
        types.Tool(
            name=TOOL_DOWNLOAD_JOB_ARTIFACT,
            description=desc.DESC_DOWNLOAD_JOB_ARTIFACT,
            inputSchema={
                "type": "object",
                "properties": {
                    "project_id": {"type": "string", "description": desc.DESC_PROJECT_ID},
                    "job_id": {"type": "integer", "description": desc.DESC_JOB_ID},
                    "artifact_path": {"type": "string", "description": desc.DESC_ARTIFACT_PATH}
                },
                "required": ["job_id"]
            }
        ),
        types.Tool(
            name=TOOL_LIST_PROJECT_JOBS,
            description=desc.DESC_LIST_PROJECT_JOBS,
            inputSchema={
                "type": "object",
                "properties": {
                    "project_id": {"type": "string", "description": desc.DESC_PROJECT_ID},
                    "scope": {"type": "string", "description": desc.DESC_JOB_SCOPE, "enum": ["created", "pending", "running", "failed", "success", "canceled", "skipped", "waiting_for_resource", "manual"]},
                    "per_page": {"type": "integer", "description": desc.DESC_PER_PAGE, "default": DEFAULT_PAGE_SIZE, "minimum": 1, "maximum": MAX_PAGE_SIZE},
                    "page": {"type": "integer", "description": desc.DESC_PAGE_NUMBER, "default": 1, "minimum": 1}
                }
            }
        ),
        
        # User & Profile tools
        types.Tool(
            name=TOOL_SEARCH_USER,
            description=desc.DESC_SEARCH_USER,
            inputSchema={
                "type": "object",
                "properties": {
                    "search_term": {"type": "string", "description": "Username or email to search for"},
                    "per_page": {"type": "integer", "description": desc.DESC_PER_PAGE, "default": DEFAULT_PAGE_SIZE, "minimum": 1, "maximum": MAX_PAGE_SIZE},
                    "page": {"type": "integer", "description": desc.DESC_PAGE_NUMBER, "default": 1, "minimum": 1}
                },
                "required": ["search_term"]
            }
        ),
        types.Tool(
            name=TOOL_GET_USER_DETAILS,
            description=desc.DESC_GET_USER_DETAILS,
            inputSchema={
                "type": "object",
                "properties": {
                    "username": {"type": "string", "description": "Username string"},
                    "include_projects": {"type": "boolean", "description": "Include user's projects", "default": False},
                    "include_groups": {"type": "boolean", "description": "Include user's groups", "default": False}
                },
                "required": ["username"]
            }
        ),
        types.Tool(
            name=TOOL_GET_MY_PROFILE,
            description=desc.DESC_GET_MY_PROFILE,
            inputSchema={
                "type": "object",
                "properties": {}
            }
        ),
        types.Tool(
            name=TOOL_GET_USER_CONTRIBUTIONS_SUMMARY,
            description=desc.DESC_GET_USER_CONTRIBUTIONS_SUMMARY,
            inputSchema={
                "type": "object",
                "properties": {
                    "username": {"type": "string", "description": "Username string"},
                    "since": {"type": "string", "description": "Start date (YYYY-MM-DD)", "default": "30 days ago"},
                    "until": {"type": "string", "description": "End date (YYYY-MM-DD)", "default": "today"}
                },
                "required": ["username"]
            }
        ),
        types.Tool(
            name=TOOL_GET_USER_ACTIVITY_FEED,
            description=desc.DESC_GET_USER_ACTIVITY_FEED,
            inputSchema={
                "type": "object",
                "properties": {
                    "username": {"type": "string", "description": "Username string"},
                    "action": {"type": "string", "description": "Event action type", "enum": ["created", "updated", "closed", "reopened", "pushed", "commented", "merged", "joined", "left", "destroyed", "expired", "approved"]},
                    "target_type": {"type": "string", "description": "Event target type", "enum": ["issue", "milestone", "merge_request", "note", "project", "snippet", "user", "wiki"]},
                    "per_page": {"type": "integer", "description": desc.DESC_PER_PAGE, "default": SMALL_PAGE_SIZE, "minimum": 1, "maximum": MAX_PAGE_SIZE},
                    "page": {"type": "integer", "description": desc.DESC_PAGE_NUMBER, "default": 1, "minimum": 1}
                },
                "required": ["username"]
            }
        ),
        
        # User's Issues & MRs tools
        types.Tool(
            name=TOOL_GET_USER_OPEN_MRS,
            description=desc.DESC_GET_USER_OPEN_MRS,
            inputSchema={
                "type": "object",
                "properties": {
                    "username": {"type": "string", "description": "Username string"},
                    "scope": {"type": "string", "description": "MR scope", "enum": ["created", "assigned", "all"], "default": "created"},
                    "draft": {"type": "string", "description": "Filter by draft status", "enum": ["yes", "no", "all"], "default": "all"},
                    "per_page": {"type": "integer", "description": desc.DESC_PER_PAGE, "default": DEFAULT_PAGE_SIZE, "minimum": 1, "maximum": MAX_PAGE_SIZE},
                    "page": {"type": "integer", "description": desc.DESC_PAGE_NUMBER, "default": 1, "minimum": 1}
                },
                "required": ["username"]
            }
        ),
        types.Tool(
            name=TOOL_GET_USER_REVIEW_REQUESTS,
            description=desc.DESC_GET_USER_REVIEW_REQUESTS,
            inputSchema={
                "type": "object",
                "properties": {
                    "username": {"type": "string", "description": "Username string"},
                    "state": {"type": "string", "description": "Merge request state", "enum": ["opened", "closed", "locked", "merged"], "default": "opened"},
                    "per_page": {"type": "integer", "description": desc.DESC_PER_PAGE, "default": DEFAULT_PAGE_SIZE, "minimum": 1, "maximum": MAX_PAGE_SIZE},
                    "page": {"type": "integer", "description": desc.DESC_PAGE_NUMBER, "default": 1, "minimum": 1}
                },
                "required": ["username"]
            }
        ),
  • Constant defining the tool name used across the codebase.
    TOOL_GET_USER_REVIEW_REQUESTS = "gitlab_get_user_review_requests"
Behavior3/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It does well by describing what the tool returns (MR details, review status, priority indicators, action items, project context) and mentions pagination behavior. However, it doesn't disclose important behavioral aspects like authentication requirements, rate limits, error conditions, or whether this is a read-only operation (though 'Get' implies it).

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 well-structured with clear sections (purpose, returns, use cases, parameters, example). However, the parameter section duplicates schema information unnecessarily, and the use cases section could be more concise. The front-loaded purpose statement is excellent, but later sections contain some redundancy.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a read operation with 6 parameters and no output schema, the description provides good context about what information is returned and how to use the tool. The absence of annotations means the description should ideally cover more behavioral aspects, but it does adequately explain the tool's purpose, usage, and expected results. The example helps clarify parameter usage.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

With 100% schema description coverage, the schema already documents all 6 parameters thoroughly. The description repeats parameter information but adds minimal additional semantic context beyond what's in the schema. The example shows parameter usage but doesn't provide new insights about parameter interactions or constraints.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the specific action ('Get MRs where user is assigned as reviewer with pending action') and distinguishes it from sibling tools like 'gitlab_get_merge_request' or 'gitlab_get_user_open_mrs' by focusing specifically on pending review requests. The verb+resource combination is precise and unambiguous.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

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

The description provides clear context about when to use this tool ('Personal review queue/inbox', 'Team code review management', etc.) and distinguishes it by focusing on pending review assignments. However, it doesn't explicitly state when NOT to use it or name specific alternative tools for different scenarios.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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/Vijay-Duke/mcp-gitlab'

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