opencode-gitlab-plugin
v3.2.2GitLab tools plugin for OpenCode - provides GitLab API access for merge requests, issues, pipelines, and more
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
gitlab_get_merge_request
Get details of a specific merge request by project and MR IID. Returns: title, description, state, author, assignees, reviewers, labels, diff stats, and discussion notes.
| Parameter | Type | Description |
|---|---|---|
mr_iid * | number | The internal ID of the merge request within the project |
project_id * | string | The project ID or URL-encoded path (e.g., "gitlab-org/gitlab" or "123") |
include_changes | boolean | Whether to include the list of changed files (default: false) |
gitlab_list_merge_requests
List merge requests for a project or search globally. Can filter by state (opened, closed, merged, all), scope (assigned_to_me, created_by_me), and labels. IMPORTANT: Response includes pagination info. If nextPage exists, there are more results. Always paginate until you get an empty response or no nextPage to ensure you have all data.
| Parameter | Type | Description |
|---|---|---|
labels | string | Comma-separated list of labels to filter by |
limit | number | Maximum number of results per page (default: 20) |
page | number | Page number for pagination (default: 1) |
project_id | string | The project ID or path. If not provided, searches globally. |
scope | string | Filter by scope |
search | string | Search MRs by title or description |
state | string | Filter by MR state (default: opened) |
gitlab_get_mr_changes
Get the file changes (diff) for a merge request. Returns the list of files changed with their diffs.
| Parameter | Type | Description |
|---|---|---|
mr_iid * | number | The internal ID of the merge request |
project_id * | string | The project ID or URL-encoded path |
gitlab_create_merge_request
Create a new merge request. Returns the created merge request with all details.
| Parameter | Type | Description |
|---|---|---|
project_id * | string | The project ID or URL-encoded path |
source_branch * | string | The source branch name |
target_branch * | string | The target branch name |
title * | string | The title of the merge request |
allow_collaboration | boolean | Allow commits from members who can merge to the target branch |
assignee_ids | array | Array of user IDs to assign |
description | string | The description of the merge request (supports Markdown) |
labels | string | Comma-separated list of labels |
milestone_id | number | The ID of a milestone |
remove_source_branch | boolean | Remove source branch after merge (default: false) |
reviewer_ids | array | Array of user IDs to review |
squash | boolean | Squash commits on merge (default: false) |
target_project_id | number | The ID of the target project for cross-project (fork to upstream) merge requests. Defaults to the source project when omitted. |
gitlab_update_merge_request
Update an existing merge request. Can update title, description, state, assignees, reviewers, labels, and more.
| Parameter | Type | Description |
|---|---|---|
mr_iid * | number | The internal ID of the merge request |
project_id * | string | The project ID or URL-encoded path |
assignee_ids | array | Array of user IDs to assign |
description | string | The new description (supports Markdown) |
labels | string | Comma-separated list of labels |
milestone_id | number | The ID of a milestone |
remove_source_branch | boolean | Remove source branch after merge |
reviewer_ids | array | Array of user IDs to review |
squash | boolean | Squash commits on merge |
state_event | string | Change the state (close or reopen) |
target_branch | string | The target branch name |
title | string | The new title |
gitlab_get_mr_details
Get additional details for a merge request. Detail types: - commits: List all commits in the MR - pipelines: List all pipelines that ran for the MR Examples: - Get commits: detail_type="commits", project_id="group/project", mr_iid=123 - Get pipelines: detail_type="pipelines", project_id="group/project", mr_iid=123
| Parameter | Type | Description |
|---|---|---|
detail_type * | string | Type of details to fetch |
mr_iid * | number | The internal ID of the merge request |
project_id * | string | The project ID or URL-encoded path |
gitlab_list_merge_request_diffs
List merge request diffs with pagination support. Returns the list of file diffs for a merge request, with support for pagination to handle large changesets. This is useful when you need to process diffs in chunks or when the MR has many changed files.
| Parameter | Type | Description |
|---|---|---|
mr_iid * | number | The internal ID of the merge request |
project_id * | string | The project ID or URL-encoded path |
page | number | Page number for pagination (default: 1) |
per_page | number | Number of diffs per page (default: 20, max: 100) |
gitlab_add_mr_reviewer
Add a reviewer to a merge request without affecting existing reviewers. This is safer than gitlab_update_merge_request when you only want to add a single reviewer, as it preserves all existing reviewers.
| Parameter | Type | Description |
|---|---|---|
mr_iid * | number | The internal ID of the merge request |
project_id * | string | The project ID or URL-encoded path |
reviewer_id * | number | The user ID of the reviewer to add |
gitlab_remove_mr_reviewer
Remove a reviewer from a merge request without affecting other reviewers. This is safer than gitlab_update_merge_request when you only want to remove a single reviewer, as it preserves all other reviewers.
| Parameter | Type | Description |
|---|---|---|
mr_iid * | number | The internal ID of the merge request |
project_id * | string | The project ID or URL-encoded path |
reviewer_id * | number | The user ID of the reviewer to remove |
gitlab_set_mr_auto_merge
Enable auto-merge (MWPS - Merge When Pipeline Succeeds) on a merge request. Uses the GitLab GraphQL API mergeRequestAccept mutation with a merge strategy. The MR will be automatically merged when all required conditions are met. Requires the MR to be approved and have a passing pipeline (depending on project settings). Note: You must provide the current HEAD SHA of the MR to prevent race conditions.
| Parameter | Type | Description |
|---|---|---|
mr_iid * | number | The internal ID of the merge request |
project_id * | string | The project ID or path (e.g., "gitlab-org/gitlab") |
sha * | string | The HEAD SHA of the merge request. Get this from the MR details (diff_refs.head_sha or sha field). |
strategy | string | MERGE_WHEN_CHECKS_PASS (default) waits for all checks. ADD_TO_MERGE_TRAIN_WHEN_CHECKS_PASS adds to merge train. |
gitlab_smart_merge_mr
Smart merge: merges immediately if checks pass, otherwise enables auto-merge (MWPS). This tool automatically determines the best merge action based on MR state: - If MR is mergeable (pipeline passed, approved): merges immediately - If pipeline is running or awaiting approval: enables auto-merge - Returns detailed context about what happened and why Provides actionable feedback on failures including MR state, pipeline status, and remediation hints. Note: You must provide the current HEAD SHA of the MR to prevent race conditions.
| Parameter | Type | Description |
|---|---|---|
mr_iid * | number | The internal ID of the merge request |
project_id * | string | The project ID or path (e.g., "gitlab-org/gitlab") |
sha * | string | The HEAD SHA of the merge request. Get this from the MR details (diff_refs.head_sha or sha field). |
strategy | string | Auto-merge strategy when immediate merge is not possible. If omitted, it is auto-detected from the project: merge-train projects use ADD_TO_MERGE_TRAIN_WHEN_CHECKS_PASS, otherwise MERGE_WHEN_CHECKS_PA… |
gitlab_merge_mr
Merge a merge request immediately. Use this when you know the MR is ready to merge (pipeline passed, approved, no conflicts). For automatic handling based on MR state, use gitlab_smart_merge_mr instead. WARNING: If sha is omitted, the merge may succeed against a newer commit than what was reviewed/approved. Always provide sha when you want to ensure you're merging the exact code that was reviewed.
| Parameter | Type | Description |
|---|---|---|
mr_iid * | number | The internal ID of the merge request |
project_id * | string | The project ID or path (e.g., "gitlab-org/gitlab") |
sha | string | HEAD SHA to verify before merging. Recommended to prevent merging unreviewed code if new commits were pushed. |
should_remove_source_branch | boolean | Whether to delete source branch after merge |
squash | boolean | Whether to squash commits (uses project default if not specified) |
gitlab_override_requested_changes
Bypass (or re-enable) a "requested changes" merge block on a merge request. When a reviewer formally requests changes, the merge check "Change requests must be approved by the requesting user" blocks the merge (detailed_merge_status: requested_changes). This tool sets the persistent override_requested_changes flag, which is exactly what the "Bypass" button in the MR widget does: it downgrades that check from a blocking failure to a non-blocking warning so the MR can be merged. Use this when the requesting reviewer is unavailable (e.g. on PTO) and their concerns have been addressed. The actin…
| Parameter | Type | Description |
|---|---|---|
mr_iid * | number | The internal ID of the merge request |
project_id * | string | The project ID or URL-encoded path |
override | boolean | true (default) to bypass requested changes, false to restore the block |
gitlab_approve_merge_request
Approve a merge request. Adds the current user's approval to the merge request. Requires at least Developer role on the project. Returns the updated approval state including approved_by list.
| Parameter | Type | Description |
|---|---|---|
mr_iid * | number | The internal ID of the merge request |
project_id * | string | The project ID or URL-encoded path |
sha | string | The HEAD SHA of the MR. If provided, the approval will only succeed if this matches the current HEAD, preventing approval of outdated code. |
gitlab_unapprove_merge_request
Unapprove (revoke approval from) a merge request. Removes the current user's approval from the merge request. Only the user who approved can unapprove; you cannot remove others' approvals. Returns the updated approval state.
| Parameter | Type | Description |
|---|---|---|
mr_iid * | number | The internal ID of the merge request |
project_id * | string | The project ID or URL-encoded path |
gitlab_create_issue
Create a new issue in a GitLab project. Returns the created issue with all details including IID, web URL, and metadata.
| Parameter | Type | Description |
|---|---|---|
project_id * | string | The project ID or URL-encoded path |
title * | string | The title of the issue |
assignee_ids | array | Array of user IDs to assign the issue to |
confidential | boolean | Whether the issue should be confidential |
description | string | The description of the issue (supports Markdown) |
due_date | string | Due date for the issue in YYYY-MM-DD format (e.g., "2025-12-31") |
epic_id | number | The ID of the epic to add the issue to (Premium/Ultimate) |
issue_type | string | The type of issue (default: issue) |
labels | string | Comma-separated list of label names (e.g., "bug,critical") |
milestone_id | number | The ID of the milestone to assign the issue to |
weight | number | The weight of the issue (for issue boards) |
gitlab_get_issue
Get details of a specific issue by project and issue IID. Returns: title, description, state, author, assignees, labels, milestone, weight, and comments.
| Parameter | Type | Description |
|---|---|---|
issue_iid * | number | The internal ID of the issue within the project |
project_id * | string | The project ID or URL-encoded path |
gitlab_list_issues
List issues for a project or search globally. Can filter by state, labels, assignee, milestone. IMPORTANT: Response includes pagination info. If nextPage exists, there are more results. Always paginate until you get an empty response or no nextPage to ensure you have all data.
| Parameter | Type | Description |
|---|---|---|
labels | string | Comma-separated list of labels to filter by |
limit | number | Maximum number of results per page (default: 20) |
milestone | string | Filter by milestone title |
page | number | Page number for pagination (default: 1) |
project_id | string | The project ID or path. If not provided, searches globally. |
scope | string | Filter by scope |
search | string | Search issues by title or description |
state | string | Filter by issue state (default: opened) |
gitlab_get_epic
Get details of a specific epic by group and epic IID. Returns: title, description, state, author, start/end dates, labels, associated issues, and child epics.
| Parameter | Type | Description |
|---|---|---|
epic_iid * | number | The internal ID of the epic within the group |
group_id * | string | The group ID or URL-encoded path (e.g., "gitlab-org" or "my-group/my-subgroup") |
gitlab_list_epics
List epics for a group with filtering capabilities. Can filter by state (opened, closed, all), author, labels, and search query.
| Parameter | Type | Description |
|---|---|---|
group_id * | string | The group ID or URL-encoded path |
author_id | number | Filter by author user ID |
labels | string | Comma-separated list of labels to filter by |
limit | number | Maximum number of results (default: 20) |
search | string | Search epics by title or description |
state | string | Filter by epic state (default: opened) |
gitlab_create_epic
Create a new epic in a group. Returns the created epic with all details.
| Parameter | Type | Description |
|---|---|---|
group_id * | string | The group ID or URL-encoded path |
title * | string | The title of the epic |
confidential | boolean | Whether the epic is confidential (default: false) |
description | string | The description of the epic (supports Markdown) |
end_date | string | Due/end date in YYYY-MM-DD format |
labels | string | Comma-separated list of labels |
start_date | string | Start date in YYYY-MM-DD format |
gitlab_update_epic
Update an existing epic. Can update title, description, labels, dates, state, and confidentiality.
| Parameter | Type | Description |
|---|---|---|
epic_iid * | number | The internal ID of the epic |
group_id * | string | The group ID or URL-encoded path |
confidential | boolean | Whether the epic is confidential |
description | string | The new description (supports Markdown) |
end_date | string | Due/end date in YYYY-MM-DD format |
labels | string | Comma-separated list of labels |
start_date | string | Start date in YYYY-MM-DD format |
state_event | string | Change the state (close or reopen) |
title | string | The new title |
gitlab_manage_epic_issues
Manage issues linked to a GitLab epic. Actions: - list: Get all issues associated with the epic - add: Link an existing issue to the epic (issue can be from any project within the group hierarchy) - remove: Unlink an issue from the epic Examples: - List issues: action="list", group_id="gitlab-org", epic_iid=123 - Add issue: action="add", group_id="gitlab-org", epic_iid=123, issue_id=456 - Remove issue: action="remove", group_id="gitlab-org", epic_iid=123, epic_issue_id=789 Note: The epic_issue_id (for remove) is the ID of the epic-issue association, which can be obtained from the list actio…
| Parameter | Type | Description |
|---|---|---|
action * | string | The action to perform |
epic_iid * | number | The internal ID of the epic within the group |
group_id * | string | The group ID or URL-encoded path |
epic_issue_id | number | The ID of the epic-issue association to remove (required for "remove" action, from list response) |
issue_id | number | The global ID of the issue to add (required for "add" action) |
gitlab_list_pipelines
List pipelines for a project. Can filter by status, ref (branch/tag), username.
| Parameter | Type | Description |
|---|---|---|
project_id * | string | The project ID or URL-encoded path |
limit | number | Maximum number of results (default: 20) |
ref | string | Filter by branch or tag name |
status | string | Filter by pipeline status |
gitlab_get_pipeline
Get details of a specific pipeline including its jobs.
| Parameter | Type | Description |
|---|---|---|
pipeline_id * | number | The ID of the pipeline |
project_id * | string | The project ID or URL-encoded path |
gitlab_list_pipeline_jobs
List jobs for a pipeline, optionally filter by scope (failed, success, etc).
| Parameter | Type | Description |
|---|---|---|
pipeline_id * | number | The ID of the pipeline |
project_id * | string | The project ID or URL-encoded path |
scope | string | Filter jobs by scope/status |
gitlab_get_job_log
Get the log/trace output of a specific CI job.
| Parameter | Type | Description |
|---|---|---|
job_id * | number | The ID of the job |
project_id * | string | The project ID or URL-encoded path |
gitlab_retry_job
Retry a failed or canceled CI job.
| Parameter | Type | Description |
|---|---|---|
job_id * | number | The ID of the job to retry |
project_id * | string | The project ID or URL-encoded path |
gitlab_get_pipeline_failing_jobs
Get all failed jobs in a pipeline. Returns only the jobs that have failed, making it easier to debug pipeline failures.
| Parameter | Type | Description |
|---|---|---|
pipeline_id * | number | The ID of the pipeline |
project_id * | string | The project ID or URL-encoded path |
gitlab_lint_ci_config
Validate a CI/CD YAML configuration against GitLab CI syntax rules. This validates the configuration in the context of the project, including: - Using the project's CI/CD variables - Searching the project's files for include:local entries - Optionally simulating pipeline creation (dry_run) - Optionally including the list of jobs that would be created Modes: - content: Validate provided YAML content (requires 'content' parameter) - existing: Validate the existing .gitlab-ci.yml from the repository Returns validation result with: - valid: boolean indicating if configuration is valid - errors:…
| Parameter | Type | Description |
|---|---|---|
mode * | string | Validation mode: "content" for provided YAML, "existing" for repo file |
project_id * | string | The project ID or URL-encoded path |
content | string | The CI/CD configuration content (YAML as string) - required for mode="content" |
content_ref | string | For mode="existing": Commit SHA, branch or tag to get CI config from (defaults to project default branch) |
dry_run | boolean | Run pipeline creation simulation instead of just static check (default: false) |
include_jobs | boolean | Include list of jobs that would be created in the response (default: false) |
ref | string | Branch or tag context to use for validation (defaults to project default branch) |
gitlab_get_file
Get the contents of a file from a repository. Supports fetching files from any branch, tag, or commit SHA. An explicit ref is required by the GitLab repository files API. Note: Invalid refs will result in a 404 error from the GitLab API.
| Parameter | Type | Description |
|---|---|---|
file_path * | string | Path to the file in the repository |
project_id * | string | The project ID or URL-encoded path |
ref * | string | Branch name, tag, or commit SHA to fetch the file from. Supports full or short commit SHAs. |
gitlab_get_commit
Get a single commit with full details. Returns commit metadata including author, message, stats, and parent commits.
| Parameter | Type | Description |
|---|---|---|
project_id * | string | The project ID or URL-encoded path |
sha * | string | The commit SHA |
gitlab_list_commits
List commits in a repository. Can filter by branch/ref and path.
| Parameter | Type | Description |
|---|---|---|
project_id * | string | The project ID or URL-encoded path |
limit | number | Maximum number of results (default: 20) |
path | string | File or directory path to filter commits |
ref | string | Branch or tag name |
since | string | Only commits after this date (ISO 8601 format) |
until | string | Only commits before this date (ISO 8601 format) |
gitlab_get_commit_diff
Get the diff for a specific commit.
| Parameter | Type | Description |
|---|---|---|
project_id * | string | The project ID or URL-encoded path |
sha * | string | The commit SHA |
gitlab_list_repository_tree
List files and directories in a repository. Returns the tree structure of the repository at a given path and ref.
| Parameter | Type | Description |
|---|---|---|
project_id * | string | The project ID or URL-encoded path |
path | string | Path inside repository (default: root) |
per_page | number | Number of results per page (default: 20) |
recursive | boolean | Get recursive tree (default: false) |
ref | string | Branch, tag, or commit SHA (default: default branch) |
gitlab_list_branches
List branches in a repository.
| Parameter | Type | Description |
|---|---|---|
project_id * | string | The project ID or URL-encoded path |
search | string | Search branches by name |
gitlab_get_commit_comments
Get all comments on a specific commit. Returns all comments (notes) that have been added to a commit, including line-specific comments. This is different from discussions - it returns individual comments in a flat structure.
| Parameter | Type | Description |
|---|---|---|
project_id * | string | The project ID or URL-encoded path |
sha * | string | The commit SHA |
gitlab_search
Search across GitLab for various resources with scope-specific options. Scopes and their requirements: - projects: Search projects by name/description - issues: Search issues by title/description - merge_requests: Search MRs by title/description - milestones: Search milestones (supports state filter) - users: Search users by name/email - blobs: Search file content (code search) - commits: Search commits by message/author/SHA (supports ref filter) - notes: Search comments/notes (requires project_id) - wiki_blobs: Search wiki content (supports ref filter) - group_projects: Search projects withi…
| Parameter | Type | Description |
|---|---|---|
scope * | string | The type of resource to search |
search * | string | The search query |
group_id | string | Group ID or path. Required for group_projects scope |
limit | number | Maximum number of results (default: 20) |
order_by | string | Order results by field (for milestones, users, commits, notes, wiki_blobs, group_projects) |
project_id | string | Limit search to a specific project. Required for notes scope |
ref | string | Branch or tag name (for commits, wiki_blobs scopes) |
sort | string | Sort order (for milestones, users, commits, notes, wiki_blobs, group_projects) |
state | string | Filter by state (for milestones scope) |
gitlab_documentation_search
Search GitLab official documentation at docs.gitlab.com. Returns relevant documentation pages matching the search query. Useful for: - Finding GitLab feature documentation - Learning about GitLab APIs and integrations - Discovering best practices and guides - Troubleshooting GitLab issues Note: This searches the public GitLab documentation site, not your instance's documentation.
| Parameter | Type | Description |
|---|---|---|
search * | string | The search query (documentation topic or keyword) |
limit | number | Maximum number of results (default: 10) |
gitlab_get_project
Get details of a specific project.
| Parameter | Type | Description |
|---|---|---|
project_id * | string | The project ID or URL-encoded path (e.g., "gitlab-org/gitlab") |
gitlab_list_project_members
List members of a project.
| Parameter | Type | Description |
|---|---|---|
project_id * | string | The project ID or URL-encoded path |
gitlab_get_current_user
Get current user information. Returns details about the authenticated user including username, email, and permissions.
gitlab_get_user
Get a user by their ID. Returns user details including username, name, state, and profile information.
| Parameter | Type | Description |
|---|---|---|
user_id * | number | The user ID |
gitlab_get_user_by_username
Find a user by their username. Returns user details including ID, name, state, and profile information. Useful for looking up a user's ID when you only know their username.
| Parameter | Type | Description |
|---|---|---|
username * | string | The username to look up (without @ prefix) |
gitlab_get_user_status
Get a user's status including availability. Returns the user's status emoji, message, and availability (e.g., "busy"). Useful for checking if someone is available before requesting a review.
| Parameter | Type | Description |
|---|---|---|
user_id * | number | The user ID |
gitlab_list_vulnerabilities
List persisted vulnerabilities for a project. Returns security vulnerabilities detected in the project.
| Parameter | Type | Description |
|---|---|---|
project_id * | string | The project ID or URL-encoded path |
limit | number | Maximum number of results (default: 20) |
report_type | string | Filter by report type |
severity | string | Filter by severity level |
state | string | Filter by vulnerability state |
gitlab_get_vulnerability_details
Get details for a specific vulnerability. Returns full information about a security vulnerability including description, location, and remediation.
| Parameter | Type | Description |
|---|---|---|
project_id * | string | The project ID or URL-encoded path |
vulnerability_id * | number | The ID of the vulnerability |
gitlab_create_vulnerability_issue
Create a new issue linked to one or more security vulnerabilities. This creates an issue in the project and automatically links it to the specified vulnerabilities. Requires Developer role or higher.
| Parameter | Type | Description |
|---|---|---|
project_path * | string | Full path of the project (e.g., "group/project" or "group/subgroup/project") |
vulnerability_ids * | array | Array of vulnerability IDs in format "gid://gitlab/Vulnerability/{id}". Get these from gitlab_list_vulnerabilities. |
gitlab_dismiss_vulnerability
Dismiss a security vulnerability with a reason. Use this when a vulnerability is not applicable, is a false positive, or has been mitigated. Requires Developer role or higher.
| Parameter | Type | Description |
|---|---|---|
reason * | string | Reason for dismissing the vulnerability |
vulnerability_id * | string | Vulnerability ID in format "gid://gitlab/Vulnerability/{id}". Get this from gitlab_list_vulnerabilities. |
comment | string | Optional comment explaining the dismissal |
gitlab_confirm_vulnerability
Confirm a security vulnerability. Use this to acknowledge that a vulnerability is valid and needs attention. Requires Developer role or higher.
| Parameter | Type | Description |
|---|---|---|
vulnerability_id * | string | Vulnerability ID in format "gid://gitlab/Vulnerability/{id}". Get this from gitlab_list_vulnerabilities. |
comment | string | Optional comment about the confirmation |
gitlab_revert_vulnerability_to_detected
Revert a vulnerability back to detected state. Use this to undo a previous confirmation or dismissal. Requires Developer role or higher.
| Parameter | Type | Description |
|---|---|---|
vulnerability_id * | string | Vulnerability ID in format "gid://gitlab/Vulnerability/{id}". Get this from gitlab_list_vulnerabilities. |
comment | string | Optional comment about reverting the state |
gitlab_update_vulnerability_severity
Update the severity level of one or more vulnerabilities. Use this to adjust the severity rating based on your assessment. Requires Developer role or higher.
| Parameter | Type | Description |
|---|---|---|
comment * | string | Comment explaining the severity change (required) |
severity * | string | New severity level for the vulnerabilities |
vulnerability_ids * | array | Array of vulnerability IDs in format "gid://gitlab/Vulnerability/{id}". Get these from gitlab_list_vulnerabilities. |
gitlab_link_vulnerability_to_issue
Link an existing issue to one or more vulnerabilities. Use this to associate vulnerabilities with an existing issue for tracking. Requires Developer role or higher.
| Parameter | Type | Description |
|---|---|---|
issue_id * | string | Issue ID in format "gid://gitlab/Issue/{id}". You can construct this from the issue IID. |
vulnerability_ids * | array | Array of vulnerability IDs in format "gid://gitlab/Vulnerability/{id}". Get these from gitlab_list_vulnerabilities. |
gitlab_list_todos
List TODO items for the current user using GraphQL API with pagination support. Returns a list of pending or done TODO items assigned to the authenticated user. TODOs are created when you are assigned to an issue/MR, mentioned in a comment, or when someone requests your review. The response includes pagination information (pageInfo) with cursors for fetching additional pages. Use 'after' with the 'endCursor' from pageInfo to get the next page. Use 'before' with the 'startCursor' from pageInfo to get the previous page.
| Parameter | Type | Description |
|---|---|---|
action | string | Filter by action type |
after | string | Cursor for forward pagination - use endCursor from previous response |
author_id | number | Filter by author ID |
before | string | Cursor for backward pagination - use startCursor from previous response |
first | number | Number of items to return from the beginning (default: 20, max: 100) |
group_id | string | Filter by group ID |
last | number | Number of items to return from the end (for backward pagination) |
project_id | string | Filter by project ID or path |
state | string | Filter by state (default: pending) |
type | string | Filter by target type |
gitlab_mark_todo_done
Mark TODO items as done. Actions: - one: Mark a specific TODO item as done (requires todo_id) - all: Mark all pending TODO items as done Examples: - Mark one: action="one", todo_id=123 - Mark all: action="all"
| Parameter | Type | Description |
|---|---|---|
action * | string | Action to perform: "one" for single TODO, "all" for all TODOs |
todo_id | number | The ID of the TODO item (required for action="one") |
gitlab_get_todo_count
Get the count of pending TODO items. Returns the total number of pending TODOs for the current user.
gitlab_get_wiki_page
Get a wiki page with its content. Returns the wiki page content and metadata.
| Parameter | Type | Description |
|---|---|---|
project_id * | string | The project ID or URL-encoded path |
slug * | string | The slug (URL-friendly name) of the wiki page |
gitlab_get_work_item
Get a single work item (issue, epic, task, etc.). Work items are the new unified model for issues, epics, tasks, and other work tracking items in GitLab.
| Parameter | Type | Description |
|---|---|---|
project_id * | string | The project ID or full path (e.g. "gitlab-org/gitlab") |
work_item_id * | number | The IID of the work item — the number visible in the GitLab URL (e.g. for https://gitlab.com/group/project/-/work_items/52, use 52). This is NOT the global database ID. |
gitlab_list_work_items
List work items in a project or group. Work items include issues, epics, tasks, and other work tracking items.
| Parameter | Type | Description |
|---|---|---|
group_id | string | The group ID or URL-encoded path |
labels | string | Comma-separated list of labels to filter by |
limit | number | Maximum number of results (default: 20) |
project_id | string | The project ID or URL-encoded path |
search | string | Search work items by title or description |
state | string | Filter by state (default: opened) |
work_item_type | string | Filter by work item type (e.g., 'Issue', 'Epic', 'Task') |
gitlab_get_work_item_notes
Get all comments for a work item. Returns all notes/comments on the work item in chronological order.
| Parameter | Type | Description |
|---|---|---|
project_id * | string | The project ID or full path (e.g. "gitlab-org/gitlab") |
work_item_id * | number | The IID of the work item — the number visible in the GitLab URL (e.g. for https://gitlab.com/group/project/-/work_items/52, use 52). This is NOT the global database ID. |
gitlab_create_work_item
Create a new work item (issue, task, etc.). Work items are the new unified model for issues, epics, tasks, and other work tracking items.
| Parameter | Type | Description |
|---|---|---|
project_id * | string | The project ID or URL-encoded path |
title * | string | The title of the work item |
work_item_type_id * | number | The ID of the work item type (e.g., 1 for Issue, 2 for Task) |
assignee_ids | array | Array of user IDs to assign |
description | string | The description of the work item (supports Markdown) |
labels | array | Array of label names |
gitlab_update_work_item
Update an existing work item. Can update title, description, state, labels, and assignees.
| Parameter | Type | Description |
|---|---|---|
project_id * | string | The project ID or full path (e.g. "gitlab-org/gitlab") |
work_item_id * | number | The IID of the work item — the number visible in the GitLab URL (e.g. for https://gitlab.com/group/project/-/work_items/52, use 52). This is NOT the global database ID. |
assignee_ids | array | Array of user IDs to assign |
description | string | The new description (supports Markdown) |
labels | array | Array of label names |
state_event | string | Change the state (close or reopen) |
title | string | The new title |
gitlab_create_work_item_note
Create a comment on a work item.
| Parameter | Type | Description |
|---|---|---|
body * | string | The content of the note/comment (supports Markdown) |
project_id * | string | The project ID or full path (e.g. "gitlab-org/gitlab") |
work_item_id * | number | The IID of the work item — the number visible in the GitLab URL (e.g. for https://gitlab.com/group/project/-/work_items/52, use 52). This is NOT the global database ID. |
gitlab_list_discussions
List discussions (comment threads) on any GitLab resource. Supports: merge_requests, issues, epics, commits, snippets. Returns discussion threads with nested notes. Each discussion contains a 'notes' array with individual comments. For pagination, use 'after' with the 'endCursor' from pageInfo to get the next page. Examples: - MR: resource_type="merge_request", project_id="group/project", iid=123 - Issue: resource_type="issue", project_id="group/project", iid=456 - Epic: resource_type="epic", group_id="my-group", iid=1 - Commit: resource_type="commit", project_id="group/project", sha="ab…
| Parameter | Type | Description |
|---|---|---|
resource_type * | string | Type of GitLab resource |
after | string | Cursor for pagination - use endCursor from previous response |
before | string | Cursor for backward pagination |
first | integer | Number of items to return (default: 20, max: 100; 0 uses the default) |
group_id | string | Group ID or path. Required for epic |
iid | number | Internal ID of the resource (for merge_request, issue, epic) |
last | integer | Number of items from the end (max: 100; 0 is omitted) |
project_id | string | Project ID or path. Required for merge_request, issue, commit, snippet |
resolved | boolean | Filter by resolved status: true for resolved, false for unresolved. Only returns resolvable discussions (excludes system notes). Client-side filtering. |
sha | string | Commit SHA (required for commit) |
snippet_id | number | Snippet ID (required for snippet) |
gitlab_get_discussion
Get a specific discussion thread with all its replies. Returns the discussion with its 'notes' array containing all comments. Use this to get full context of a specific conversation. Required parameters vary by resource type: - merge_request: project_id, iid, discussion_id - issue: project_id, iid, discussion_id - epic: group_id, iid, discussion_id - commit: project_id, sha, discussion_id - snippet: project_id, snippet_id, discussion_id
| Parameter | Type | Description |
|---|---|---|
discussion_id * | string | The ID of the discussion thread |
resource_type * | string | Type of GitLab resource |
group_id | string | Group ID or path (for epic) |
iid | number | Internal ID (for merge_request, issue, epic) |
project_id | string | Project ID or path |
sha | string | Commit SHA (for commit) |
snippet_id | number | Snippet ID (for snippet) |
gitlab_create_discussion
Create a new discussion thread or reply to an existing one. REPLYING TO EXISTING THREADS: To reply to an existing discussion, provide the discussion_id parameter. This is the recommended way to reply in-thread rather than creating a standalone comment. STARTING A NEW DISCUSSION: Omit discussion_id to create a new thread. For code-specific comments on MRs/commits, provide position information. Examples: - Reply to thread: resource_type="merge_request", project_id="group/project", iid=123, discussion_id="abc123def", body="Thanks for the feedback!" - New comment: resource_type="merge_request",…
| Parameter | Type | Description |
|---|---|---|
body * | string | The comment text (Markdown supported) |
resource_type * | string | Type of GitLab resource |
discussion_id | string | If provided, replies to existing discussion. If omitted, creates new thread |
group_id | string | Group ID or path (for epic) |
iid | number | Internal ID (for merge_request, issue, epic) |
position | object | Position for code-specific comments (MR/commit only) |
project_id | string | Project ID or path |
sha | string | Commit SHA (for commit) |
snippet_id | number | Snippet ID (for snippet) |
gitlab_resolve_discussion
Mark a discussion thread as resolved or unresolve it. Only works for resolvable discussions (MRs and issues only). Uses GraphQL API which handles all discussion types including outdated discussions (those with resolved: null) that the REST API cannot handle. Use after addressing feedback to indicate the discussion is complete.
| Parameter | Type | Description |
|---|---|---|
action * | string | Whether to resolve or unresolve |
discussion_id * | string | The ID of the discussion thread |
iid * | number | Internal ID of the MR or issue |
project_id * | string | Project ID or path |
resource_type * | string | Type of resource (only MR and issue discussions can be resolved) |
gitlab_list_notes
List all notes/comments on any GitLab resource using GraphQL API with pagination support. Returns all comments including system notes in chronological order. This is easier to read than discussions which have nested structure. The response includes pagination information (pageInfo) with cursors for fetching additional pages. Use 'after' with the 'endCursor' from pageInfo to get the next page. Use 'before' with the 'startCursor' from pageInfo to get the previous page. Examples: - MR: resource_type="merge_request", project_id="group/project", iid=123 - Issue: resource_type="issue", project_id=…
| Parameter | Type | Description |
|---|---|---|
resource_type * | string | Type of GitLab resource |
after | string | Cursor for forward pagination - use endCursor from previous response |
before | string | Cursor for backward pagination - use startCursor from previous response |
first | integer | Number of items to return from the beginning (default: 20, max: 100; 0 uses the default) |
group_id | string | Group ID or path. Required for epic |
iid | number | Internal ID of the resource (for merge_request, issue, epic) |
last | integer | Number of items to return from the end (max: 100; 0 is omitted) |
project_id | string | Project ID or path. Required for merge_request, issue, snippet |
resolved | boolean | Filter by resolved status: true for resolved, false for unresolved. Only returns resolvable notes (excludes system notes). Client-side filtering. |
snippet_id | number | Snippet ID (required for snippet) |
gitlab_get_note
Get a single note/comment from an issue or epic by its ID. Returns the full details of a specific note including author, body, timestamps, and metadata. Useful when you need to retrieve a specific comment without fetching all notes. Supports: issues, epics (MR notes use discussions API) Examples: - Issue note: resource_type="issue", project_id="group/project", iid=456, note_id=123 - Epic note: resource_type="epic", group_id="my-group", iid=1, note_id=456
| Parameter | Type | Description |
|---|---|---|
iid * | number | Internal ID of the issue or epic |
note_id * | number | The ID of the note to retrieve |
resource_type * | string | Type of GitLab resource (issue or epic only) |
group_id | string | Group ID or path. Required for epic |
project_id | string | Project ID or path. Required for issue |
gitlab_create_note
Add a simple comment/note to any GitLab resource. Creates a standalone comment (not part of a thread). For replying to existing discussion threads, use gitlab_create_discussion with discussion_id parameter instead. Set internal=true to post a confidential/internal note visible only to project members (supported for merge requests, issues, and epics; not supported for snippets, where passing internal=true raises an error rather than silently posting a public note). Examples: - MR comment: resource_type="merge_request", project_id="group/project", iid=123, body="LGTM!" - Issue comment: resou…
| Parameter | Type | Description |
|---|---|---|
body * | string | The content of the note/comment (supports Markdown) |
resource_type * | string | Type of GitLab resource |
group_id | string | Group ID or path. Required for epic |
iid | number | Internal ID of the resource (for merge_request, issue, epic) |
internal | boolean | Post as a confidential/internal note visible only to project members (merge requests, issues, and epics; not supported for snippets, where passing true raises an error). Defaults to false (public note… |
project_id | string | Project ID or path. Required for merge_request, issue, snippet |
snippet_id | number | Snippet ID (required for snippet) |
gitlab_update_note
Update an existing note/comment on any GitLab resource. Modifies the body content of an existing note. You can only update notes you authored. Examples: - MR note: resource_type="merge_request", project_id="group/project", iid=123, note_id=456, body="Updated comment" - Issue note: resource_type="issue", project_id="group/project", iid=456, note_id=789, body="Updated comment" - Epic note: resource_type="epic", group_id="my-group", iid=1, note_id=456, body="Updated comment" - Snippet note: resource_type="snippet", project_id="group/project", snippet_id=789, note_id=123, body="Updated comment"
| Parameter | Type | Description |
|---|---|---|
body * | string | The new content for the note (supports Markdown) |
note_id * | number | The ID of the note to update |
resource_type * | string | Type of GitLab resource |
group_id | string | Group ID or path. Required for epic |
iid | number | Internal ID of the resource (for merge_request, issue, epic) |
project_id | string | Project ID or path. Required for merge_request, issue, snippet |
snippet_id | number | Snippet ID (required for snippet) |
run_git_command
Execute safe, read-only git commands in the repository working directory. Security restrictions: - Only read-only git commands are allowed (status, log, show, diff, branch, tag, etc.) - Destructive operations are forbidden (push, pull, commit, add, rm, reset, merge, etc.) - Shell operators and command injection attempts are blocked - Commands are executed with a 30-second timeout and 10MB output buffer Allowed commands include: - status: Show working tree status - log: Show commit logs - show: Show various types of objects - diff: Show changes between commits, commit and working tree, etc. -…
| Parameter | Type | Description |
|---|---|---|
command * | string | The git command to execute (without "git" prefix) |
args | array | Array of arguments for the git command (default: []) |
working_directory | string | Path to the git repository (default: current working directory). Use this to execute git commands in a specific repository. |
gitlab_list_project_audit_events
List audit events for a project. Returns audit events including actions like project settings changes, member additions/removals, and other security-relevant activities. Note: Requires project owner role or higher.
| Parameter | Type | Description |
|---|---|---|
project_id * | string | The project ID or URL-encoded path |
author_id | number | Filter by author user ID |
created_after | string | Return audit events created after this date (ISO 8601 format) |
created_before | string | Return audit events created before this date (ISO 8601 format) |
entity_id | number | Filter by entity ID |
entity_type | string | Filter by entity type (e.g., "User", "Project", "Group") |
page | number | Page number for pagination (default: 1) |
per_page | number | Number of results per page (default: 20) |
gitlab_list_group_audit_events
List audit events for a group. Returns audit events including actions like group settings changes, member additions/removals, subgroup operations, and other security-relevant activities. Note: Requires group owner role or higher.
| Parameter | Type | Description |
|---|---|---|
group_id * | string | The group ID or URL-encoded path |
author_id | number | Filter by author user ID |
created_after | string | Return audit events created after this date (ISO 8601 format) |
created_before | string | Return audit events created before this date (ISO 8601 format) |
entity_id | number | Filter by entity ID |
entity_type | string | Filter by entity type (e.g., "User", "Project", "Group") |
page | number | Page number for pagination (default: 1) |
per_page | number | Number of results per page (default: 20) |
gitlab_list_instance_audit_events
List instance-level audit events. Returns audit events for the entire GitLab instance including actions like instance settings changes, user management, license changes, and other system-wide security-relevant activities. Note: Requires administrator access.
| Parameter | Type | Description |
|---|---|---|
author_id | number | Filter by author user ID |
created_after | string | Return audit events created after this date (ISO 8601 format) |
created_before | string | Return audit events created before this date (ISO 8601 format) |
entity_id | number | Filter by entity ID |
entity_type | string | Filter by entity type (e.g., "User", "Project", "Group") |
page | number | Page number for pagination (default: 1) |
per_page | number | Number of results per page (default: 20) |
gitlab_create_award_emoji
Add a reaction (award emoji) to a merge request, issue, snippet, or a note/comment on these resources. Common emoji names: thumbsup, thumbsdown, smile, tada, rocket, eyes, heart, +1, -1 To react to a specific comment/note, provide the note_id parameter. Examples: - React to MR: resource_type="merge_request", project_id="group/project", resource_iid=123, name="thumbsup" - React to issue comment: resource_type="issue", project_id="group/project", resource_iid=456, note_id=789, name="rocket"
| Parameter | Type | Description |
|---|---|---|
name * | string | Emoji name without colons (e.g., "thumbsup", "rocket", "eyes", "heart", "tada") |
project_id * | string | Project ID or URL-encoded path |
resource_iid * | number | Internal ID of the merge request, issue, or snippet |
resource_type * | string | Type of resource to add the reaction to |
note_id | number | Note/comment ID to add the reaction to (if reacting to a specific comment) |
gitlab_list_award_emoji
List all reactions (award emoji) on a merge request, issue, snippet, or a specific note/comment. Examples: - List reactions on MR: resource_type="merge_request", project_id="group/project", resource_iid=123 - List reactions on a comment: resource_type="issue", project_id="group/project", resource_iid=456, note_id=789
| Parameter | Type | Description |
|---|---|---|
project_id * | string | Project ID or URL-encoded path |
resource_iid * | number | Internal ID of the merge request, issue, or snippet |
resource_type * | string | Type of resource |
note_id | number | Note/comment ID to list reactions for (if listing for a specific comment) |
gitlab_delete_award_emoji
Remove a reaction (award emoji) from a merge request, issue, snippet, or note/comment. You need the award_id which can be found using gitlab_list_award_emoji. Examples: - Remove reaction from MR: resource_type="merge_request", project_id="group/project", resource_iid=123, award_id=456 - Remove from comment: resource_type="issue", ..., note_id=789, award_id=456
| Parameter | Type | Description |
|---|---|---|
award_id * | number | ID of the award emoji to remove |
project_id * | string | Project ID or URL-encoded path |
resource_iid * | number | Internal ID of the merge request, issue, or snippet |
resource_type * | string | Type of resource |
note_id | number | Note/comment ID if removing from a specific comment |