GITLAB MCP Tools
Total Tools: 45
Quick Reference
# List all gitlab tools
dmtools list | jq '.tools[] | select(.name | startswith("gitlab_"))'
# Example usage
dmtools gitlab_test [arguments]
Automatic GitLab factory lifecycle
The factory setup generates a native GitLab lifecycle:
All GitLab script and pipeline templates are loaded from
IstiN/dmtools-agentic-workflows at the configured workflow ref. There are no
bundled runtime script fallbacks in the setup UI; local test fixtures are
offline snapshots only.
- Assign an open issue to the development account or add
agent:dev. - Development receives the issue title, link and description, excluding the
Machine jobs section, as its explicit request. It then pushes a branch and
opens one linked merge request. Installer-generated files such as
.cursor/skillsare not published. A blocked, empty or change-free run addsneeds-humanand opens no MR. - The factory runs the configured quality gate against that exact MR head, then reviews its diff. With no generated quality preset, validation is explicitly disabled rather than dispatching an empty pipeline. Inline findings on unchanged context lines carry both old and new line numbers; findings outside the diff become general MR threads.
- Requested changes, unresolved review suggestions, and failed validation
wait for a human to add
agent:reworkto the issue or MR (or run the manual rework leg). Each request is consumed once and updates the existing source branch. Replies are posted in the original discussion threads, then the new head is validated and reviewed. Rework never starts automatically. Every open thread needs exactly one reply; if one is missing, duplicated or empty, nothing is pushed and the job log lists each problem. - Approval and successful validation add
pr_approvedto the issue and MR. The MR stays open for human merge. The factory does not merge it.
The issue description’s Machine jobs section links each development, validation, review and rework leg, including running/completed/failed status and timestamps. Existing issue text outside the managed section is preserved.
Setup creates an idempotent ten-minute reconciliation schedule and removes legacy factory-managed Issue/Merge Request webhooks and their trigger tokens. New issues, assignments, and actionable labels are picked up within ten minutes. Progress and status updates no longer create webhook pipelines. Manual runs and validation-completion callbacks can also request reconciliation. Pipeline jobs are serialized with a project resource group; validation-only pipelines do not acquire that lock. The factory releases its runner while validation is pending, then resumes from a quality-job callback or the reconciliation schedule. Machine jobs links the validation pipeline and updates the same entry when it finishes.
- Multiple-account mode:
GITLAB_DEV_TOKENruns development/rework andGITLAB_REVIEWER_TOKENruns code review. Single-account mode usesGITLAB_TOKEN. - Both tokens need
apiand project access. Development also needswrite_repository; setup needs Maintainer access for schedules and legacy webhook cleanup. - Manual run: Build > Pipelines, set
DMTOOLS_MR_IIDto an existing MR IID and optionallyDMTOOLS_FACTORY_LEG=revieworrework. - Issue-based review/rework requires exactly one linked open MR; ambiguous or missing targets fail rather than creating another MR.
blocked,needs-human, andagent:skippause automation. Agent failures require human intervention. Inspect the failure, remove stop labels when safe, and addagent:reworkagain to request another attempt.- Review runs in a temporary Git worktree at the exact MR head. Review-created runtime files and source mutations are discarded with that worktree, leaving the orchestration checkout untouched for later explicit rework.
- Rework uses its own temporary detached worktree at the exact MR source commit and pushes explicitly to the existing branch. Installer-generated skill changes in the main CI checkout cannot block rework or enter its commit. The original checkout is preserved, and temporary worktrees are cleaned up on both success and failure.
- Cleanup also removes extra agent-generated files and hidden directories in each temporary review/rework context without following symlinks. Successful cleanup preserves the operation’s exit status instead of failing an already published review because the context is not empty.
- Rework fetch/push authenticates with the development account using a username-qualified HTTPS URL, avoiding Runner job-token URL rewriting. Push authorization is checked with a dry run before invoking AI. An API error while loading failed CI jobs stops rework instead of silently reporting that no failures exist.
- The final rework checkout may be detached or on the exact MR source branch. Other branches and commits not descending from the original head are rejected; concurrent remote-head changes still block publication.
- After pushing, rework verifies the remote Git branch and allows up to 55 seconds for GitLab MR head metadata to catch up. Only then are replies posted and discussions resolved. Timeout errors distinguish a successful push from pending MR metadata and leave discussions open.
- Failed or cancelled jobs keep their failure in Machine jobs. Agent/publishing failures do not mark threads resolved or arm approval. Head changes invalidate previous validation and review.
Usage in JavaScript Agents
// Direct function calls for gitlab tools
const result = gitlab_test(...);
const result = gitlab_get_mr_comments(...);
const result = gitlab_add_mr_label(...);
Available Tools
| Tool Name | Description | Parameters |
|---|---|---|
gitlab_add_inline_mr_comment | Create a new inline code review comment on a specific file and line in a GitLab merge request. Requires base_sha, head_sha, start_sha from the MR diff refs (use gitlab_get_mr to get them from diff_refs). | workspace (string, required)repository (string, required)pullRequestId (string, required)filePath (string, required)line (string, required)text (string, required)baseSha (string, required)headSha (string, required)startSha (string, required) |
gitlab_add_issue_label | Add a label to a GitLab issue. | label (string, required)workspace (string, optional)repository (string, optional)issueNumber (string, optional)key (string, optional) |
gitlab_add_mr_comment | Add a general discussion comment to a GitLab merge request. | workspace (string, required)repository (string, required)pullRequestId (string, required)text (string, required) |
gitlab_add_mr_label | Add a label to a GitLab merge request. | workspace (string, required)repository (string, required)pullRequestId (string, required)label (string, required) |
gitlab_approve_mr | Approve a GitLab merge request. Adds your approval to the MR. | workspace (string, required)repository (string, required)pullRequestId (string, required) |
gitlab_assign_issue | Assign a GitLab issue to a user by username. | user (string, required)workspace (string, optional)repository (string, optional)issueNumber (string, optional)key (string, optional) |
gitlab_cancel_job | Cancel a GitLab CI job. | workspace (string, required)repository (string, required)jobId (string, required) |
gitlab_close_issue | Close a GitLab issue. | workspace (string, optional)repository (string, optional)issueNumber (string, optional)key (string, optional) |
gitlab_create_issue | Create a GitLab issue. | title (string, required)workspace (string, optional)repository (string, optional)body (string, optional)key (string, optional) |
gitlab_create_issue_comment | Create a comment (note) on a GitLab issue. | body (string, required)workspace (string, optional)repository (string, optional)issueNumber (string, optional)key (string, optional) |
gitlab_create_mr | Create a GitLab merge request from a source branch into a target branch. | workspace (string, required)repository (string, required)sourceBranch (string, required)targetBranch (string, required)title (string, required)description (string, optional)removeSourceBranch (string, optional) |
gitlab_create_mr_note | Create a note (comment) on a GitLab merge request. Same endpoint as gitlab_add_mr_comment; the dmtools-dart catalog exposes both names. | workspace (string, required)repository (string, required)pullRequestId (string, required)text (string, required) |
gitlab_delete_release_asset | Delete a GitLab release asset by its asset name. Removes both the release link and the underlying Generic Package Registry file. Use gitlab_list_release_assets to find asset names. | workspace (string, required)repository (string, required)tagName (string, required)assetName (string, required)packageName (string, optional) |
gitlab_download_release_asset | Download a GitLab release asset (a file published to the Generic Package Registry and attached to a release) to a local file path. | workspace (string, required)repository (string, required)tagName (string, required)assetName (string, required)targetFilePath (string, required)packageName (string, optional) |
gitlab_get_commit_statuses | Get CI/CD statuses for a commit SHA in a GitLab project. Returns one entry per status report (e.g. posted by an external CI like Jenkins via the gitlabBuilds plugin, or GitLab’s own pipeline). Equivalent of GitHub’s ‘check runs’ for GitLab. When the same status name was reported more than once for this commit (e.g. a CI job was retried), only the most recent report per name is returned. | workspace (string, required)repository (string, required)commitSha (string, required) |
gitlab_get_issue | Get details of a GitLab issue including title, description, state, author, labels, and assignees. | workspace (string, optional)repository (string, optional)issueNumber (string, optional)key (string, optional) |
gitlab_get_issue_comments | Get all comments (notes) of a GitLab issue, oldest first. Returns a JSON array of notes. | workspace (string, optional)repository (string, optional)issueNumber (string, optional)key (string, optional) |
gitlab_get_job_logs | Get GitLab CI job trace logs. | workspace (string, required)repository (string, required)jobId (string, required) |
gitlab_get_mr | Get details of a specific GitLab merge request including title, description, state, author, diff_refs (base_sha, head_sha, start_sha needed for inline comments). | workspace (string, required)repository (string, required)pullRequestId (string, required) |
gitlab_get_mr_activities | Get all activities for a GitLab merge request. Approvals are fetched from the real GitLab Approvals API. General discussion notes are also included. | workspace (string, required)repository (string, required)pullRequestId (string, required) |
gitlab_get_mr_comments | Get all comments for a GitLab merge request, including both inline code review comments (DiffNote) and general discussion notes. Excludes system-generated notes. | workspace (string, required)repository (string, required)pullRequestId (string, required) |
gitlab_get_mr_diff | Get diff stats and changed files for a GitLab merge request. | workspace (string, required)repository (string, required)pullRequestId (string, required) |
gitlab_get_mr_diff_text | Get the raw unified diff text for a GitLab merge request (suitable for locating file/line positions, e.g. for inline review comments). | workspace (string, required)repository (string, required)pullRequestId (string, required) |
gitlab_get_mr_discussions | Get all discussion threads for a GitLab merge request. Each discussion contains notes (comments) and a resolved status. Use the discussion id with gitlab_resolve_mr_thread. | workspace (string, required)repository (string, required)pullRequestId (string, required) |
gitlab_get_mr_pipelines | List CI pipelines for a specific GitLab merge request (the CI verdict for the MR head). | workspace (string, required)repository (string, required)pullRequestId (string, required) |
gitlab_get_or_create_release | Find an existing GitLab release by tag, or create one if it does not exist. Useful for a stable artefact storage release (mirrors github_get_or_create_draft_release). Note: GitLab releases have no draft concept; releases are visible as soon as they are created. | workspace (string, required)repository (string, required)tagName (string, required)releaseName (string, optional)targetCommitish (string, optional)body (string, optional) |
gitlab_get_pipeline_jobs | List jobs for a GitLab CI pipeline. | workspace (string, required)repository (string, required)pipelineId (string, required) |
gitlab_list_issues | List issues in a GitLab project. State can be ‘opened’, ‘closed’, or ‘all’. | workspace (string, required)repository (string, required)state (string, optional)perPage (number, optional) |
gitlab_list_mrs | List merge requests for a GitLab project. State can be ‘opened’, ‘closed’, ‘merged’, or ‘all’. | workspace (string, required)repository (string, required)state (string, required) |
gitlab_list_pipeline_runs | List recent GitLab CI pipelines. Optionally filter by status, ref, and limit. | workspace (string, required)repository (string, required)status (string, optional)ref (string, optional)limit (string, optional) |
gitlab_list_project_jobs | List recent GitLab CI jobs for a project. | workspace (string, required)repository (string, required) |
gitlab_list_release_assets | List all assets (asset links) attached to a GitLab release. Returns a JSON array of link objects including id, name, url, and direct_asset_url. | workspace (string, required)repository (string, required)tagName (string, required) |
gitlab_merge_mr | Merge a GitLab merge request. Optionally provide a custom merge commit message. | workspace (string, required)repository (string, required)pullRequestId (string, required)mergeCommitMessage (string, optional) |
gitlab_move_issue_to_status | Move a GitLab issue to a status. ‘done’/‘closed’/‘completed’/‘resolved’ close the issue, ‘open’/‘reopened’ reopen it; any other status is applied as a scoped ‘status:: | statusName (string, required)workspace (string, optional)repository (string, optional)issueNumber (string, optional)key (string, optional) |
gitlab_rebase_mr | Ask GitLab to rebase/update a merge request source branch with its target branch. | workspace (string, required)repository (string, required)pullRequestId (string, required) |
gitlab_remove_issue_label | Remove a label from a GitLab issue. | label (string, required)workspace (string, optional)repository (string, optional)issueNumber (string, optional)key (string, optional) |
gitlab_remove_mr_label | Remove a label from a GitLab merge request. | workspace (string, required)repository (string, required)pullRequestId (string, required)label (string, required) |
gitlab_reopen_issue | Reopen a closed GitLab issue. | workspace (string, optional)repository (string, optional)issueNumber (string, optional)key (string, optional) |
gitlab_reply_to_mr_thread | Reply to an existing discussion thread in a GitLab merge request. Use the discussion id from gitlab_get_mr_discussions. | workspace (string, required)repository (string, required)pullRequestId (string, required)discussionId (string, required)text (string, required) |
gitlab_resolve_mr_thread | Resolve (close) a review discussion thread in a GitLab merge request. Use the discussion id from gitlab_get_mr_discussions. | workspace (string, required)repository (string, required)pullRequestId (string, required)discussionId (string, required) |
gitlab_search_issues | Search GitLab issues of a project with a query string matched against title and description. Returns a JSON array of issues. | query (string, required)workspace (string, optional)repository (string, optional)state (string, optional) |
gitlab_test | Test GitLab connectivity by fetching the current user’s profile | None |
gitlab_trigger_pipeline | Trigger a GitLab CI pipeline for a branch or tag using the authenticated API token. | workspace (string, required)repository (string, required)ref (string, required)variablesJson (string, optional) |
gitlab_unapprove_mr | Unapprove a GitLab merge request. Revokes your approval from the MR. | workspace (string, required)repository (string, required)pullRequestId (string, required) |
gitlab_upload_release_asset | Upload a local file as a GitLab release asset. Internally publishes the file to the project’s Generic Package Registry and attaches it to the release as an asset link, so it is discoverable the same way as a GitHub release asset. Returns the release link metadata including direct_asset_url. Set overwrite=true to automatically replace an existing asset with the same name before uploading (GitLab’s Generic Package Registry rejects duplicate uploads with 409 Conflict otherwise). | workspace (string, required)repository (string, required)tagName (string, required)filePath (string, required)assetName (string, optional)contentType (string, optional)packageName (string, optional)overwrite (string, optional) |
Detailed Parameter Information
gitlab_add_inline_mr_comment
Create a new inline code review comment on a specific file and line in a GitLab merge request. Requires base_sha, head_sha, start_sha from the MR diff refs (use gitlab_get_mr to get them from diff_refs).
Parameters:
-
workspace(string) Required- GitLab group or namespace
- Example:
mygroup
-
repository(string) Required- Repository name
- Example:
myrepo
-
pullRequestId(string) Required- Merge request IID
- Example:
42
-
filePath(string) Required- Path to the file to comment on
- Example:
src/main/Foo.java
-
line(string) Required- Line number in the new file to comment on
- Example:
42
-
text(string) Required- Comment text
- Example:
This looks wrong
-
baseSha(string) Required- Base commit SHA from MR diff_refs
- Example:
abc123
-
headSha(string) Required- Head commit SHA from MR diff_refs
- Example:
def456
-
startSha(string) Required- Start commit SHA from MR diff_refs
- Example:
abc123
Example:
dmtools gitlab_add_inline_mr_comment "value" "value"
// In JavaScript agent
const result = gitlab_add_inline_mr_comment("workspace", "repository");
gitlab_add_issue_label
Add a label to a GitLab issue.
Parameters:
-
label(string) Required- The label name to add
- Example:
bug
-
workspace(string) Optional- GitLab group or namespace
- Example:
mygroup
-
repository(string) Optional- Repository name
- Example:
myrepo
-
issueNumber(string) Optional- The issue IID
- Example:
42
-
key(string) Optional- Composite issue key ‘namespace/project#123’ or ‘gl-123’ (alternative to workspace/repository/issueNumber)
- Example:
mygroup/myrepo#42
Example:
dmtools gitlab_add_issue_label "value"
// In JavaScript agent
const result = gitlab_add_issue_label(...);
gitlab_add_mr_comment
Add a general discussion comment to a GitLab merge request.
Parameters:
-
workspace(string) Required- GitLab group or namespace
- Example:
mygroup
-
repository(string) Required- Repository name
- Example:
myrepo
-
pullRequestId(string) Required- Merge request IID
- Example:
42
-
text(string) Required- Comment text
- Example:
LGTM!
Example:
dmtools gitlab_add_mr_comment "value" "value"
// In JavaScript agent
const result = gitlab_add_mr_comment("workspace", "repository");
gitlab_add_mr_label
Add a label to a GitLab merge request.
Parameters:
-
workspace(string) Required- GitLab group or namespace
- Example:
mygroup
-
repository(string) Required- Repository name
- Example:
myrepo
-
pullRequestId(string) Required- Merge request IID
- Example:
42
-
label(string) Required- Label to add
- Example:
pr_approved
Example:
dmtools gitlab_add_mr_label "value" "value"
// In JavaScript agent
const result = gitlab_add_mr_label("workspace", "repository");
gitlab_approve_mr
Approve a GitLab merge request. Adds your approval to the MR.
Parameters:
-
workspace(string) Required- GitLab group or namespace
- Example:
mygroup
-
repository(string) Required- Repository name
- Example:
myrepo
-
pullRequestId(string) Required- Merge request IID
- Example:
42
Example:
dmtools gitlab_approve_mr "value" "value"
// In JavaScript agent
const result = gitlab_approve_mr("workspace", "repository");
gitlab_assign_issue
Assign a GitLab issue to a user by username.
Parameters:
-
user(string) Required- The assignee GitLab username
- Example:
jsmith
-
workspace(string) Optional- GitLab group or namespace
- Example:
mygroup
-
repository(string) Optional- Repository name
- Example:
myrepo
-
issueNumber(string) Optional- The issue IID
- Example:
42
-
key(string) Optional- Composite issue key ‘namespace/project#123’ or ‘gl-123’ (alternative to workspace/repository/issueNumber)
- Example:
mygroup/myrepo#42
Example:
dmtools gitlab_assign_issue "value"
// In JavaScript agent
const result = gitlab_assign_issue(...);
gitlab_cancel_job
Cancel a GitLab CI job.
Parameters:
-
workspace(string) Required- GitLab group or namespace
- Example:
mygroup
-
repository(string) Required- Repository name
- Example:
myrepo
-
jobId(string) Required- GitLab job ID
- Example:
123456
Example:
dmtools gitlab_cancel_job "value" "value"
// In JavaScript agent
const result = gitlab_cancel_job("workspace", "repository");
gitlab_close_issue
Close a GitLab issue.
Parameters:
-
workspace(string) Optional- GitLab group or namespace
- Example:
mygroup
-
repository(string) Optional- Repository name
- Example:
myrepo
-
issueNumber(string) Optional- The issue IID
- Example:
42
-
key(string) Optional- Composite issue key ‘namespace/project#123’ or ‘gl-123’ (alternative to workspace/repository/issueNumber)
- Example:
mygroup/myrepo#42
Example:
dmtools gitlab_close_issue "value"
// In JavaScript agent
const result = gitlab_close_issue(...);
gitlab_create_issue
Create a GitLab issue.
Parameters:
-
title(string) Required- The title of the new issue
- Example:
Something is broken
-
workspace(string) Optional- GitLab group or namespace
- Example:
mygroup
-
repository(string) Optional- Repository name
- Example:
myrepo
-
body(string) Optional- The issue description (markdown)
- Example:
Steps to reproduce...
-
key(string) Optional- Composite project key ‘namespace/project’ (alternative to workspace/repository)
- Example:
mygroup/myrepo
Example:
dmtools gitlab_create_issue "value"
// In JavaScript agent
const result = gitlab_create_issue(...);
gitlab_create_issue_comment
Create a comment (note) on a GitLab issue.
Parameters:
-
body(string) Required- The comment body text
- Example:
Looks good!
-
workspace(string) Optional- GitLab group or namespace
- Example:
mygroup
-
repository(string) Optional- Repository name
- Example:
myrepo
-
issueNumber(string) Optional- The issue IID
- Example:
42
-
key(string) Optional- Composite issue key ‘namespace/project#123’ or ‘gl-123’ (alternative to workspace/repository/issueNumber)
- Example:
mygroup/myrepo#42
Example:
dmtools gitlab_create_issue_comment "value"
// In JavaScript agent
const result = gitlab_create_issue_comment(...);
gitlab_create_mr
Create a GitLab merge request from a source branch into a target branch.
Parameters:
-
workspace(string) Required- GitLab group or namespace
- Example:
mygroup
-
repository(string) Required- Repository name
- Example:
myrepo
-
sourceBranch(string) Required- Source branch name
- Example:
feature/PROJ-123
-
targetBranch(string) Required- Target branch name
- Example:
main
-
title(string) Required- Merge request title
- Example:
PROJ-123 Implement feature
-
description(string) Optional- Merge request description
- Example:
Automated changes
-
removeSourceBranch(string) Optional- Remove source branch after merge
- Example:
true
Example:
dmtools gitlab_create_mr "value" "value"
// In JavaScript agent
const result = gitlab_create_mr("workspace", "repository");
gitlab_create_mr_note
Create a note (comment) on a GitLab merge request. Same endpoint as gitlab_add_mr_comment; the dmtools-dart catalog exposes both names.
Parameters:
-
workspace(string) Required- GitLab group or namespace
- Example:
mygroup
-
repository(string) Required- Repository name
- Example:
myrepo
-
pullRequestId(string) Required- Merge request IID
- Example:
42
-
text(string) Required- The note body text
- Example:
Looks good
Example:
dmtools gitlab_create_mr_note "value" "value"
// In JavaScript agent
const result = gitlab_create_mr_note("workspace", "repository");
gitlab_delete_release_asset
Delete a GitLab release asset by its asset name. Removes both the release link and the underlying Generic Package Registry file. Use gitlab_list_release_assets to find asset names.
Parameters:
-
workspace(string) Required- GitLab group or namespace
- Example:
mygroup
-
repository(string) Required- Repository name
- Example:
myrepo
-
tagName(string) Required- The tag name of the release.
- Example:
pr-attachments-storage
-
assetName(string) Required- The name of the asset to delete, as returned by gitlab_list_release_assets.
- Example:
clip_123.png
-
packageName(string) Optional- Optional Generic Package Registry package name the asset was uploaded under. Defaults to ‘release-assets’.
- Example:
release-assets
Example:
dmtools gitlab_delete_release_asset "value" "value"
// In JavaScript agent
const result = gitlab_delete_release_asset("workspace", "repository");
gitlab_download_release_asset
Download a GitLab release asset (a file published to the Generic Package Registry and attached to a release) to a local file path.
Parameters:
-
workspace(string) Required- GitLab group or namespace
- Example:
mygroup
-
repository(string) Required- Repository name
- Example:
myrepo
-
tagName(string) Required- The tag name of the release.
- Example:
pr-attachments-storage
-
assetName(string) Required- The name of the asset to download, as returned by gitlab_list_release_assets.
- Example:
clip_123.png
-
targetFilePath(string) Required- Local file path where the downloaded asset should be saved.
- Example:
/tmp/downloaded_clip_123.png
-
packageName(string) Optional- Optional Generic Package Registry package name the asset was uploaded under. Defaults to ‘release-assets’.
- Example:
release-assets
Example:
dmtools gitlab_download_release_asset "value" "value"
// In JavaScript agent
const result = gitlab_download_release_asset("workspace", "repository");
gitlab_get_commit_statuses
Get CI/CD statuses for a commit SHA in a GitLab project. Returns one entry per status report (e.g. posted by an external CI like Jenkins via the gitlabBuilds plugin, or GitLab’s own pipeline). Equivalent of GitHub’s ‘check runs’ for GitLab. When the same status name was reported more than once for this commit (e.g. a CI job was retried), only the most recent report per name is returned.
Parameters:
-
workspace(string) Required- GitLab group or namespace
- Example:
mygroup
-
repository(string) Required- Repository name
- Example:
myrepo
-
commitSha(string) Required- The commit SHA to get statuses for
- Example:
abc123...
Example:
dmtools gitlab_get_commit_statuses "value" "value"
// In JavaScript agent
const result = gitlab_get_commit_statuses("workspace", "repository");
gitlab_get_issue
Get details of a GitLab issue including title, description, state, author, labels, and assignees.
Parameters:
-
workspace(string) Optional- GitLab group or namespace
- Example:
mygroup
-
repository(string) Optional- Repository name
- Example:
myrepo
-
issueNumber(string) Optional- The issue IID
- Example:
42
-
key(string) Optional- Composite issue key ‘namespace/project#123’ or ‘gl-123’ (alternative to workspace/repository/issueNumber)
- Example:
mygroup/myrepo#42
Example:
dmtools gitlab_get_issue "value"
// In JavaScript agent
const result = gitlab_get_issue(...);
gitlab_get_issue_comments
Get all comments (notes) of a GitLab issue, oldest first. Returns a JSON array of notes.
Parameters:
-
workspace(string) Optional- GitLab group or namespace
- Example:
mygroup
-
repository(string) Optional- Repository name
- Example:
myrepo
-
issueNumber(string) Optional- The issue IID
- Example:
42
-
key(string) Optional- Composite issue key ‘namespace/project#123’ or ‘gl-123’ (alternative to workspace/repository/issueNumber)
- Example:
mygroup/myrepo#42
Example:
dmtools gitlab_get_issue_comments "value"
// In JavaScript agent
const result = gitlab_get_issue_comments(...);
gitlab_get_job_logs
Get GitLab CI job trace logs.
Parameters:
-
workspace(string) Required- GitLab group or namespace
- Example:
mygroup
-
repository(string) Required- Repository name
- Example:
myrepo
-
jobId(string) Required- GitLab job ID
- Example:
123456
Example:
dmtools gitlab_get_job_logs "value" "value"
// In JavaScript agent
const result = gitlab_get_job_logs("workspace", "repository");
gitlab_get_mr
Get details of a specific GitLab merge request including title, description, state, author, diff_refs (base_sha, head_sha, start_sha needed for inline comments).
Parameters:
-
workspace(string) Required- GitLab group or namespace
- Example:
mygroup
-
repository(string) Required- Repository name
- Example:
myrepo
-
pullRequestId(string) Required- Merge request IID
- Example:
42
Example:
dmtools gitlab_get_mr "value" "value"
// In JavaScript agent
const result = gitlab_get_mr("workspace", "repository");
gitlab_get_mr_activities
Get all activities for a GitLab merge request. Approvals are fetched from the real GitLab Approvals API. General discussion notes are also included.
Parameters:
-
workspace(string) Required- GitLab group or namespace
- Example:
mygroup
-
repository(string) Required- Repository name
- Example:
myrepo
-
pullRequestId(string) Required- Merge request IID
- Example:
42
Example:
dmtools gitlab_get_mr_activities "value" "value"
// In JavaScript agent
const result = gitlab_get_mr_activities("workspace", "repository");
gitlab_get_mr_comments
Get all comments for a GitLab merge request, including both inline code review comments (DiffNote) and general discussion notes. Excludes system-generated notes.
Parameters:
-
workspace(string) Required- GitLab group or namespace
- Example:
mygroup
-
repository(string) Required- Repository name
- Example:
myrepo
-
pullRequestId(string) Required- Merge request IID
- Example:
42
Example:
dmtools gitlab_get_mr_comments "value" "value"
// In JavaScript agent
const result = gitlab_get_mr_comments("workspace", "repository");
gitlab_get_mr_diff
Get diff stats and changed files for a GitLab merge request.
Parameters:
-
workspace(string) Required- GitLab group or namespace
- Example:
mygroup
-
repository(string) Required- Repository name
- Example:
myrepo
-
pullRequestId(string) Required- Merge request IID
- Example:
42
Example:
dmtools gitlab_get_mr_diff "value" "value"
// In JavaScript agent
const result = gitlab_get_mr_diff("workspace", "repository");
gitlab_get_mr_diff_text
Get the raw unified diff text for a GitLab merge request (suitable for locating file/line positions, e.g. for inline review comments).
Parameters:
-
workspace(string) Required- GitLab group or namespace
- Example:
mygroup
-
repository(string) Required- Repository name
- Example:
myrepo
-
pullRequestId(string) Required- Merge request IID
- Example:
42
Example:
dmtools gitlab_get_mr_diff_text "value" "value"
// In JavaScript agent
const result = gitlab_get_mr_diff_text("workspace", "repository");
gitlab_get_mr_discussions
Get all discussion threads for a GitLab merge request. Each discussion contains notes (comments) and a resolved status. Use the discussion id with gitlab_resolve_mr_thread.
Parameters:
-
workspace(string) Required- GitLab group or namespace
- Example:
mygroup
-
repository(string) Required- Repository name
- Example:
myrepo
-
pullRequestId(string) Required- Merge request IID
- Example:
42
Example:
dmtools gitlab_get_mr_discussions "value" "value"
// In JavaScript agent
const result = gitlab_get_mr_discussions("workspace", "repository");
gitlab_get_mr_pipelines
List CI pipelines for a specific GitLab merge request (the CI verdict for the MR head).
Parameters:
-
workspace(string) Required- GitLab group or namespace
- Example:
mygroup
-
repository(string) Required- Repository name
- Example:
myrepo
-
pullRequestId(string) Required- Merge request IID
- Example:
42
Example:
dmtools gitlab_get_mr_pipelines "value" "value"
// In JavaScript agent
const result = gitlab_get_mr_pipelines("workspace", "repository");
gitlab_get_or_create_release
Find an existing GitLab release by tag, or create one if it does not exist. Useful for a stable artefact storage release (mirrors github_get_or_create_draft_release). Note: GitLab releases have no draft concept; releases are visible as soon as they are created.
Parameters:
-
workspace(string) Required- GitLab group or namespace
- Example:
mygroup
-
repository(string) Required- Repository name
- Example:
myrepo
-
tagName(string) Required- The Git tag name for the release. Reused to find an existing release.
- Example:
pr-attachments-storage
-
releaseName(string) Optional- The human-readable release name. If empty, tagName is used.
- Example:
PR Attachments Storage
-
targetCommitish(string) Optional- Optional branch or commit SHA the release’s tag should point to when created (GitLab ‘ref’). Required if the tag does not already exist.
- Example:
main
-
body(string) Optional- Optional Markdown release notes/description.
- Example:
Internal storage release for PR attachments.
Example:
dmtools gitlab_get_or_create_release "value" "value"
// In JavaScript agent
const result = gitlab_get_or_create_release("workspace", "repository");
gitlab_get_pipeline_jobs
List jobs for a GitLab CI pipeline.
Parameters:
-
workspace(string) Required- GitLab group or namespace
- Example:
mygroup
-
repository(string) Required- Repository name
- Example:
myrepo
-
pipelineId(string) Required- GitLab pipeline ID
- Example:
123456
Example:
dmtools gitlab_get_pipeline_jobs "value" "value"
// In JavaScript agent
const result = gitlab_get_pipeline_jobs("workspace", "repository");
gitlab_list_issues
List issues in a GitLab project. State can be ‘opened’, ‘closed’, or ‘all’.
Parameters:
-
workspace(string) Required- GitLab group or namespace
- Example:
mygroup
-
repository(string) Required- Repository name
- Example:
myrepo
-
state(string) Optional- Issue state filter: opened, closed, all
- Example:
opened
-
perPage(number) Optional- Page size (max 100)
- Example:
50
Example:
dmtools gitlab_list_issues "value" "value"
// In JavaScript agent
const result = gitlab_list_issues("workspace", "repository");
gitlab_list_mrs
List merge requests for a GitLab project. State can be ‘opened’, ‘closed’, ‘merged’, or ‘all’.
Parameters:
-
workspace(string) Required- GitLab group or namespace
- Example:
mygroup
-
repository(string) Required- Repository name
- Example:
myrepo
-
state(string) Required- MR state: opened, closed, merged, all. ‘open’ is also accepted as a synonym for ‘opened’.
- Example:
opened
Example:
dmtools gitlab_list_mrs "value" "value"
// In JavaScript agent
const result = gitlab_list_mrs("workspace", "repository");
gitlab_list_pipeline_runs
List recent GitLab CI pipelines. Optionally filter by status, ref, and limit.
Parameters:
-
workspace(string) Required- GitLab group or namespace
- Example:
mygroup
-
repository(string) Required- Repository name
- Example:
myrepo
-
status(string) Optional- Pipeline status filter
- Example:
failed
-
ref(string) Optional- Branch or tag ref
- Example:
main
-
limit(string) Optional- Maximum number of pipelines to return
- Example:
50
Example:
dmtools gitlab_list_pipeline_runs "value" "value"
// In JavaScript agent
const result = gitlab_list_pipeline_runs("workspace", "repository");
gitlab_list_project_jobs
List recent GitLab CI jobs for a project.
Parameters:
-
workspace(string) Required- GitLab group or namespace
- Example:
mygroup
-
repository(string) Required- Repository name
- Example:
myrepo
Example:
dmtools gitlab_list_project_jobs "value" "value"
// In JavaScript agent
const result = gitlab_list_project_jobs("workspace", "repository");
gitlab_list_release_assets
List all assets (asset links) attached to a GitLab release. Returns a JSON array of link objects including id, name, url, and direct_asset_url.
Parameters:
-
workspace(string) Required- GitLab group or namespace
- Example:
mygroup
-
repository(string) Required- Repository name
- Example:
myrepo
-
tagName(string) Required- The tag name of the release.
- Example:
pr-attachments-storage
Example:
dmtools gitlab_list_release_assets "value" "value"
// In JavaScript agent
const result = gitlab_list_release_assets("workspace", "repository");
gitlab_merge_mr
Merge a GitLab merge request. Optionally provide a custom merge commit message.
Parameters:
-
workspace(string) Required- GitLab group or namespace
- Example:
mygroup
-
repository(string) Required- Repository name
- Example:
myrepo
-
pullRequestId(string) Required- Merge request IID
- Example:
42
-
mergeCommitMessage(string) Optional- Optional custom merge commit message
- Example:
Merge feature branch
Example:
dmtools gitlab_merge_mr "value" "value"
// In JavaScript agent
const result = gitlab_merge_mr("workspace", "repository");
gitlab_move_issue_to_status
Move a GitLab issue to a status. ‘done’/‘closed’/‘completed’/‘resolved’ close the issue, ‘open’/‘reopened’ reopen it; any other status is applied as a scoped ‘status::
Parameters:
-
statusName(string) Required- The target status name
- Example:
Done
-
workspace(string) Optional- GitLab group or namespace
- Example:
mygroup
-
repository(string) Optional- Repository name
- Example:
myrepo
-
issueNumber(string) Optional- The issue IID
- Example:
42
-
key(string) Optional- Composite issue key ‘namespace/project#123’ or ‘gl-123’ (alternative to workspace/repository/issueNumber)
- Example:
mygroup/myrepo#42
Example:
dmtools gitlab_move_issue_to_status "value"
// In JavaScript agent
const result = gitlab_move_issue_to_status(...);
gitlab_rebase_mr
Ask GitLab to rebase/update a merge request source branch with its target branch.
Parameters:
-
workspace(string) Required- GitLab group or namespace
- Example:
mygroup
-
repository(string) Required- Repository name
- Example:
myrepo
-
pullRequestId(string) Required- Merge request IID
- Example:
42
Example:
dmtools gitlab_rebase_mr "value" "value"
// In JavaScript agent
const result = gitlab_rebase_mr("workspace", "repository");
gitlab_remove_issue_label
Remove a label from a GitLab issue.
Parameters:
-
label(string) Required- The label name to remove
- Example:
bug
-
workspace(string) Optional- GitLab group or namespace
- Example:
mygroup
-
repository(string) Optional- Repository name
- Example:
myrepo
-
issueNumber(string) Optional- The issue IID
- Example:
42
-
key(string) Optional- Composite issue key ‘namespace/project#123’ or ‘gl-123’ (alternative to workspace/repository/issueNumber)
- Example:
mygroup/myrepo#42
Example:
dmtools gitlab_remove_issue_label "value"
// In JavaScript agent
const result = gitlab_remove_issue_label(...);
gitlab_remove_mr_label
Remove a label from a GitLab merge request.
Parameters:
-
workspace(string) Required- GitLab group or namespace
- Example:
mygroup
-
repository(string) Required- Repository name
- Example:
myrepo
-
pullRequestId(string) Required- Merge request IID
- Example:
42
-
label(string) Required- Label to remove
- Example:
pr_approved
Example:
dmtools gitlab_remove_mr_label "value" "value"
// In JavaScript agent
const result = gitlab_remove_mr_label("workspace", "repository");
gitlab_reopen_issue
Reopen a closed GitLab issue.
Parameters:
-
workspace(string) Optional- GitLab group or namespace
- Example:
mygroup
-
repository(string) Optional- Repository name
- Example:
myrepo
-
issueNumber(string) Optional- The issue IID
- Example:
42
-
key(string) Optional- Composite issue key ‘namespace/project#123’ or ‘gl-123’ (alternative to workspace/repository/issueNumber)
- Example:
mygroup/myrepo#42
Example:
dmtools gitlab_reopen_issue "value"
// In JavaScript agent
const result = gitlab_reopen_issue(...);
gitlab_reply_to_mr_thread
Reply to an existing discussion thread in a GitLab merge request. Use the discussion id from gitlab_get_mr_discussions.
Parameters:
-
workspace(string) Required- GitLab group or namespace
- Example:
mygroup
-
repository(string) Required- Repository name
- Example:
myrepo
-
pullRequestId(string) Required- Merge request IID
- Example:
42
-
discussionId(string) Required- Discussion thread ID
- Example:
6a9c1750b37d57bba1079be3bbd13a...
-
text(string) Required- Reply text
- Example:
Addressed in latest commit
Example:
dmtools gitlab_reply_to_mr_thread "value" "value"
// In JavaScript agent
const result = gitlab_reply_to_mr_thread("workspace", "repository");
gitlab_resolve_mr_thread
Resolve (close) a review discussion thread in a GitLab merge request. Use the discussion id from gitlab_get_mr_discussions.
Parameters:
-
workspace(string) Required- GitLab group or namespace
- Example:
mygroup
-
repository(string) Required- Repository name
- Example:
myrepo
-
pullRequestId(string) Required- Merge request IID
- Example:
42
-
discussionId(string) Required- Discussion thread ID to resolve
- Example:
6a9c1750b37d57bba1079be3bbd13a...
Example:
dmtools gitlab_resolve_mr_thread "value" "value"
// In JavaScript agent
const result = gitlab_resolve_mr_thread("workspace", "repository");
gitlab_search_issues
Search GitLab issues of a project with a query string matched against title and description. Returns a JSON array of issues.
Parameters:
-
query(string) Required- Text matched against issue title and description
- Example:
login fails
-
workspace(string) Optional- GitLab group or namespace to scope the search to
- Example:
mygroup
-
repository(string) Optional- Repository name to scope the search to
- Example:
myrepo
-
state(string) Optional- Issue state filter: opened, closed, all (default: all)
- Example:
opened
Example:
dmtools gitlab_search_issues "value"
// In JavaScript agent
const result = gitlab_search_issues(...);
gitlab_test
Test GitLab connectivity by fetching the current user’s profile
Parameters: None
Example:
dmtools gitlab_test
// In JavaScript agent
const result = gitlab_test();
gitlab_trigger_pipeline
Trigger a GitLab CI pipeline for a branch or tag using the authenticated API token.
Parameters:
-
workspace(string) Required- GitLab group or namespace
- Example:
mygroup
-
repository(string) Required- Repository name
- Example:
myrepo
-
ref(string) Required- Branch or tag ref
- Example:
main
-
variablesJson(string) Optional- Optional JSON object of CI variables
- Example:
{"CONFIG_FILE":"agents/story_development.json"}
Example:
dmtools gitlab_trigger_pipeline "value" "value"
// In JavaScript agent
const result = gitlab_trigger_pipeline("workspace", "repository");
gitlab_unapprove_mr
Unapprove a GitLab merge request. Revokes your approval from the MR.
Parameters:
-
workspace(string) Required- GitLab group or namespace
- Example:
mygroup
-
repository(string) Required- Repository name
- Example:
myrepo
-
pullRequestId(string) Required- Merge request IID
- Example:
42
Example:
dmtools gitlab_unapprove_mr "value" "value"
// In JavaScript agent
const result = gitlab_unapprove_mr("workspace", "repository");
gitlab_upload_release_asset
Upload a local file as a GitLab release asset. Internally publishes the file to the project’s Generic Package Registry and attaches it to the release as an asset link, so it is discoverable the same way as a GitHub release asset. Returns the release link metadata including direct_asset_url. Set overwrite=true to automatically replace an existing asset with the same name before uploading (GitLab’s Generic Package Registry rejects duplicate uploads with 409 Conflict otherwise).
Parameters:
-
workspace(string) Required- GitLab group or namespace
- Example:
mygroup
-
repository(string) Required- Repository name
- Example:
myrepo
-
tagName(string) Required- The tag name of the release returned by gitlab_get_or_create_release.
- Example:
pr-attachments-storage
-
filePath(string) Required- Absolute or relative path to the local file to upload.
- Example:
/tmp/preview.png
-
assetName(string) Optional- Optional asset filename shown in GitLab. Defaults to the local filename.
- Example:
clip_123.png
-
contentType(string) Optional- Optional MIME type. Defaults to detected type or application/octet-stream.
- Example:
image/png
-
packageName(string) Optional- Optional Generic Package Registry package name used to group the uploaded files. Defaults to ‘release-assets’.
- Example:
release-assets
-
overwrite(string) Optional- If true, delete any existing asset (release link + underlying generic package file) with the same name before uploading. Defaults to false.
- Example:
true
Example:
dmtools gitlab_upload_release_asset "value" "value"
// In JavaScript agent
const result = gitlab_upload_release_asset("workspace", "repository");