Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| GITLAB_HOST | Yes | The GitLab host URL (e.g., gitlab.com) | |
| GITLAB_TOKEN | Yes | Your GitLab personal access token with API scopes (read_api, api) |
Schema
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| fetch_merge_request | Fetch a GitLab merge request and its contents.
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 merge request information |
| compare_versions | 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_comment | 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_discussion | 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_discussion | 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_discussion | 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_discussion | 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_request | 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_request | 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_requests | 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_projects | 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. |