Skip to content
Talk to an Engineer Dashboard

GitLab

Connect to GitLab to manage repositories, issues, merge requests, CI/CD pipelines, groups, releases, and more with 110 tools.

Connect to GitLab to manage repositories, issues, merge requests, CI/CD pipelines, groups, and releases — all from your agent.

GitLab logo

Supports authentication: OAuth 2.0

What you can build with this connector
Use caseTools involved
Automated code review botgitlab_merge_requests_listgitlab_merge_request_diff_getgitlab_merge_request_note_create
CI/CD health monitorgitlab_pipelines_listgitlab_pipeline_getgitlab_pipeline_retry (on failure)
Issue triage agentgitlab_issues_listgitlab_issue_update (add labels/milestone) → gitlab_issue_note_create
Release automationgitlab_commits_listgitlab_tag_creategitlab_release_create
Repository scaffoldinggitlab_project_creategitlab_branch_creategitlab_file_creategitlab_project_member_add
Security auditgitlab_project_variables_listgitlab_deploy_keys_listgitlab_project_webhooks_list
Onboarding automationgitlab_group_member_addgitlab_project_member_addgitlab_issue_create (onboarding task)
Dependency update botgitlab_file_getgitlab_branch_creategitlab_file_updategitlab_merge_request_create

Key concepts:

  • Project ID vs. path: Most tools accept a numeric project_id or a URL-encoded path like namespace%2Fproject. Paths are easier to read; IDs are stable even after renames.
  • IID vs. ID: Issues and merge requests have both a global id and an internal iid (per-project sequential number). The iid is what users see in the UI (e.g., #42). All tools that take issue_iid or merge_request_iid expect the iid.
  • Access levels: GitLab uses numeric access levels — 10 = Guest, 20 = Reporter, 30 = Developer, 40 = Maintainer, 50 = Owner. Pass these as integers to member management tools.
  • Pipeline identity verification: On GitLab.com, triggering pipelines via API requires the authenticated user to have completed identity verification at gitlab.com/-/profile/verify.
  • Premium-only tools: gitlab_merge_request_approve and gitlab_merge_request_approvals_get require GitLab Premium or higher. On Free plans these endpoints return 403 Forbidden.
  • Pagination: All list endpoints support page (1-based) and per_page (default 20, max 100). Use x-next-page from the response header to paginate.
  • Self-managed: Replace https://gitlab.com with your instance URL in all path arguments when using a self-managed GitLab instance.

Register your Scalekit environment with the GitLab connector so Scalekit handles the OAuth 2.0 flow and token lifecycle for you. The connection name you create will be used to identify and invoke the connection programmatically. Then complete the configuration in your application as follows:

  1. Set up auth redirects

    • In Scalekit dashboard, go to Agent AuthCreate Connection. Find GitLab and click Create.

    • Click Use your own credentials and copy the redirect URI. It looks like https://<SCALEKIT_ENVIRONMENT_URL>/sso/v1/oauth/<CONNECTION_ID>/callback.

      Copy redirect URI from Scalekit dashboard

    • Go to GitLab Applications settings (User SettingsApplications) and open or create your OAuth application.

    • Paste the copied URI into the Redirect URI field and click Save application.

      Add redirect URI and scopes in GitLab OAuth app

    • Under Scopes, select the permissions your agent needs:

      ScopeAccess grantedUse when
      apiFull read/write access to all API endpointsMost tools — recommended for full access
      read_userCurrent user’s profilegitlab_current_user_get only
      read_apiRead-only access to all API endpointsRead-only agents
      read_repositoryRead access to repositoriesFile and commit reads only
      write_repositoryPush access to repositoriesgitlab_file_create, gitlab_file_update, gitlab_branch_create
  2. Get client credentials

    After saving the application, GitLab shows the Application ID and Secret on the application detail page:

    GitLab application detail page with Application ID and Secret

    • Application ID — listed on the app’s main settings page
    • Secret — shown only once after creation; if you lose it, regenerate it from the same page
  3. Add credentials in Scalekit

    • In Scalekit dashboard, go to Agent AuthConnections and open the connection you created.

    • Enter your credentials:

      • Client ID — paste your GitLab Application ID
      • Client Secret — paste your GitLab Secret

      Add GitLab credentials in Scalekit dashboard

    • Click Save.

Connect a user’s GitLab account and make API calls on their behalf — Scalekit handles OAuth and token refresh automatically.

import { ScalekitClient } from '@scalekit-sdk/node';
import 'dotenv/config';
const connectionName = 'gitlab'; // connection name from Scalekit dashboard
const identifier = 'user_123'; // your unique user identifier
const scalekit = new ScalekitClient(
process.env.SCALEKIT_ENV_URL,
process.env.SCALEKIT_CLIENT_ID,
process.env.SCALEKIT_CLIENT_SECRET
);
const actions = scalekit.actions;
// Step 1: Get the authorization link and send it to your user
const { link } = await actions.getAuthorizationLink({ connectionName, identifier });
console.log('🔗 Authorize GitLab:', link);
// Step 2: After the user authorizes, make API calls via Scalekit proxy
// Example: list open issues for a project
const issues = await actions.request({
connectionName,
identifier,
path: '/api/v4/projects/my-group%2Fmy-repo/issues',
method: 'GET',
params: { state: 'opened', per_page: 50 },
});
console.log(issues.data); // Array of issue objects

Scalekit Connected Accounts tab showing authorized GitLab users with status, token expiry, and date added

Use actions.execute_tool() (Python) or actions.executeTool() (Node.js) to call any GitLab tool by name. Scalekit resolves credentials, calls the GitLab API, and returns a structured response.

Create a merge request and request review:

// Create a merge request from a feature branch
const mr = await actions.executeTool({
connectionName: 'gitlab',
identifier: 'user_123',
toolName: 'gitlab_merge_request_create',
toolInput: {
project_id: 'my-group/my-repo',
source_branch: 'feature/add-auth',
target_branch: 'main',
title: 'feat: add OAuth 2.0 authentication',
description: '## Summary\n\nAdds GitLab OAuth integration.\n\n/assign @reviewer',
remove_source_branch: true,
squash: false,
},
});
const mrIid = mr.data.iid;
console.log(`Created MR !${mrIid}: ${mr.data.web_url}`);
// Add a comment to kick off review
await actions.executeTool({
connectionName: 'gitlab',
identifier: 'user_123',
toolName: 'gitlab_merge_request_note_create',
toolInput: {
project_id: 'my-group/my-repo',
merge_request_iid: mrIid,
body: '🤖 This MR was created automatically. @reviewer please review when you get a chance.',
},
});

Trigger a pipeline and wait for result:

// Trigger a pipeline on the main branch
// Note: requires identity verification at gitlab.com/-/profile/verify
const pipeline = await actions.executeTool({
connectionName: 'gitlab',
identifier: 'user_123',
toolName: 'gitlab_pipeline_create',
toolInput: {
project_id: 'my-group/my-repo',
ref: 'main',
},
});
console.log(`Pipeline #${pipeline.data.id} triggered — status: ${pipeline.data.status}`);
// Fetch pipeline jobs to check individual job status
const jobs = await actions.executeTool({
connectionName: 'gitlab',
identifier: 'user_123',
toolName: 'gitlab_pipeline_jobs_list',
toolInput: {
project_id: 'my-group/my-repo',
pipeline_id: pipeline.data.id,
},
});
for (const job of jobs.data) {
console.log(` [${job.status}] ${job.name} — stage: ${job.stage}`);
}

Create a file in a new branch and open a merge request:

const project = 'my-group/my-repo';
const branch = `bot/add-config-${Date.now()}`;
// Create a new branch off main
await actions.executeTool({
connectionName: 'gitlab',
identifier: 'user_123',
toolName: 'gitlab_branch_create',
toolInput: { project_id: project, branch, ref: 'main' },
});
// Add a new config file
await actions.executeTool({
connectionName: 'gitlab',
identifier: 'user_123',
toolName: 'gitlab_file_create',
toolInput: {
project_id: project,
file_path: 'config/feature-flags.json',
branch,
content: JSON.stringify({ newFeature: false }, null, 2),
commit_message: 'chore: add feature flag config',
},
});
// Open a merge request
const mr = await actions.executeTool({
connectionName: 'gitlab',
identifier: 'user_123',
toolName: 'gitlab_merge_request_create',
toolInput: {
project_id: project,
source_branch: branch,
target_branch: 'main',
title: 'chore: add feature flag config',
remove_source_branch: true,
},
});
console.log(`MR !${mr.data.iid} opened: ${mr.data.web_url}`);

Triage stale open issues:

// List all open issues updated more than 90 days ago
const cutoff = new Date(Date.now() - 90 * 24 * 60 * 60 * 1000).toISOString();
const issues = await actions.executeTool({
connectionName: 'gitlab',
identifier: 'user_123',
toolName: 'gitlab_issues_list',
toolInput: {
project_id: 'my-group/my-repo',
state: 'opened',
updated_before: cutoff,
per_page: 100,
},
});
for (const issue of issues.data) {
// Add a stale label and comment
await actions.executeTool({
connectionName: 'gitlab',
identifier: 'user_123',
toolName: 'gitlab_issue_update',
toolInput: {
project_id: 'my-group/my-repo',
issue_iid: issue.iid,
add_labels: 'stale',
},
});
await actions.executeTool({
connectionName: 'gitlab',
identifier: 'user_123',
toolName: 'gitlab_issue_note_create',
toolInput: {
project_id: 'my-group/my-repo',
issue_iid: issue.iid,
body: '🤖 This issue has had no activity in 90 days and has been marked as stale. It will be closed in 14 days if no further activity occurs.',
},
});
console.log(`Marked issue #${issue.iid} as stale`);
}

List all projects accessible to the authenticated user. Supports filtering by search term, ownership, membership, and visibility.

NameTypeRequiredDescription
searchstringNoFilter projects by name
ownedbooleanNoReturn only projects owned by the current user
membershipbooleanNoReturn only projects the user is a member of
starredbooleanNoReturn only starred projects
visibilitystringNoFilter by visibility: public, internal, private
order_bystringNoSort by: id, name, path, created_at, updated_at, last_activity_at. Defaults to created_at
sortstringNoSort direction: asc or desc
pagenumberNoPage number (1-based)
per_pagenumberNoResults per page. Max 100, defaults to 20

Get a specific project by numeric ID or URL-encoded namespace/project path (e.g., my-group%2Fmy-repo).

NameTypeRequiredDescription
project_idstringYesNumeric project ID or URL-encoded path (e.g., 42 or my-group%2Fmy-repo)

Create a new GitLab project under the authenticated user’s namespace or a specified group.

NameTypeRequiredDescription
namestringYesProject name
pathstringNoProject path (URL slug). Defaults to a slugified version of name
namespace_idnumberNoNumeric ID of the group namespace. Omit to create under the user’s personal namespace
descriptionstringNoProject description
visibilitystringNopublic, internal, or private. Defaults to private
initialize_with_readmebooleanNoInitialize with a README.md file
default_branchstringNoDefault branch name. Defaults to main

Update an existing GitLab project’s settings.

NameTypeRequiredDescription
project_idstringYesProject ID or path
namestringNoNew project name
descriptionstringNoNew description
visibilitystringNoNew visibility: public, internal, private
default_branchstringNoNew default branch name
topicsarrayNoArray of topic strings (replaces all existing topics)
merge_methodstringNomerge, rebase_merge, or ff (fast-forward only)
only_allow_merge_if_pipeline_succeedsbooleanNoBlock merges unless the pipeline passes
remove_source_branch_after_mergebooleanNoAutomatically delete source branch after merge

Delete a GitLab project. This is an asynchronous operation — the API returns 202 Accepted immediately and deletion proceeds in the background. Requires Owner role.

NameTypeRequiredDescription
project_idstringYesProject ID or path

Fork a GitLab project into a specified namespace. Returns the new forked project object.

NameTypeRequiredDescription
project_idstringYesID or path of the project to fork
namespace_idnumberNoNumeric namespace ID to fork into. Defaults to the user’s personal namespace
namestringNoName for the forked project
pathstringNoPath for the forked project

Star a GitLab project. Returns the project object. Returns 304 Not Modified if already starred.

NameTypeRequiredDescription
project_idstringYesProject ID or path

Unstar a GitLab project. Returns 304 Not Modified if the project was not starred.

NameTypeRequiredDescription
project_idstringYesProject ID or path

Search within a specific GitLab project for issues, merge requests, commits, code, blobs, and more.

NameTypeRequiredDescription
project_idstringYesProject ID or path
scopestringYesWhat to search: issues, merge_requests, milestones, notes, wiki_blobs, commits, blobs, users
searchstringYesSearch query
pagenumberNoPage number
per_pagenumberNoResults per page. Max 100

List all forks of a GitLab project.

NameTypeRequiredDescription
project_idstringYesProject ID or path
pagenumberNoPage number
per_pagenumberNoResults per page. Max 100

List all namespaces accessible to the current user — personal namespaces and groups. Useful for resolving where to create a project or fork.

NameTypeRequiredDescription
searchstringNoFilter namespaces by name
pagenumberNoPage number
per_pagenumberNoResults per page

Search globally across GitLab for projects, issues, merge requests, commits, blobs, and more.

NameTypeRequiredDescription
scopestringYesWhat to search: projects, issues, merge_requests, milestones, snippet_titles, wiki_blobs, commits, blobs, users
searchstringYesSearch query (minimum 2 characters)
pagenumberNoPage number
per_pagenumberNoResults per page. Max 100

List all branches in a GitLab project repository.

NameTypeRequiredDescription
project_idstringYesProject ID or path
searchstringNoFilter branches by name
pagenumberNoPage number
per_pagenumberNoResults per page. Max 100

Get details of a specific branch, including the latest commit on that branch.

NameTypeRequiredDescription
project_idstringYesProject ID or path
branchstringYesBranch name

Create a new branch in a GitLab repository from a specified commit, branch, or tag.

NameTypeRequiredDescription
project_idstringYesProject ID or path
branchstringYesName of the new branch
refstringYesSource branch name, tag name, or commit SHA to branch from

Delete a branch from a GitLab repository. Protected branches cannot be deleted unless unprotected first.

NameTypeRequiredDescription
project_idstringYesProject ID or path
branchstringYesBranch name to delete

List all tags in a GitLab project repository.

NameTypeRequiredDescription
project_idstringYesProject ID or path
searchstringNoFilter tags by name
order_bystringNoSort by name, version, or updated. Defaults to updated
sortstringNoasc or desc
pagenumberNoPage number
per_pagenumberNoResults per page. Max 100

Get details of a specific repository tag, including the commit it points to and any associated release notes.

NameTypeRequiredDescription
project_idstringYesProject ID or path
tag_namestringYesTag name

Create a new tag in a GitLab repository. Optionally include a message to create an annotated tag.

NameTypeRequiredDescription
project_idstringYesProject ID or path
tag_namestringYesName of the tag to create
refstringYesBranch, tag, or commit SHA to tag
messagestringNoTag message. If provided, an annotated tag is created instead of a lightweight tag

Delete a tag from a GitLab repository. Protected tags cannot be deleted.

NameTypeRequiredDescription
project_idstringYesProject ID or path
tag_namestringYesName of the tag to delete

List commits for a GitLab project, optionally filtered by branch, path, or date range.

NameTypeRequiredDescription
project_idstringYesProject ID or path
ref_namestringNoBranch, tag, or commit SHA to list commits from. Defaults to the default branch
sincestringNoISO 8601 datetime — only commits after this date
untilstringNoISO 8601 datetime — only commits before this date
pathstringNoFilter commits by file path
authorstringNoFilter by commit author name or email
pagenumberNoPage number
per_pagenumberNoResults per page. Max 100

Get detailed information about a specific commit by its SHA, including stats and diff summary.

NameTypeRequiredDescription
project_idstringYesProject ID or path
shastringYesFull or short commit SHA

Get the full diff of a specific commit — lists all changed files with their hunks.

NameTypeRequiredDescription
project_idstringYesProject ID or path
shastringYesCommit SHA
pagenumberNoPage number (diffs are paginated for large commits)
per_pagenumberNoResults per page

Add an inline or general comment to a specific commit.

NameTypeRequiredDescription
project_idstringYesProject ID or path
shastringYesCommit SHA
notestringYesComment text
pathstringNoFile path for inline comment
linenumberNoLine number for inline comment
line_typestringNonew or old — which side of the diff the line is on

List all comments on a specific commit.

NameTypeRequiredDescription
project_idstringYesProject ID or path
shastringYesCommit SHA
pagenumberNoPage number
per_pagenumberNoResults per page

Compare two refs (branches, tags, or commit SHAs) and return the commits and diff between them.

NameTypeRequiredDescription
project_idstringYesProject ID or path
fromstringYesSource ref (branch name, tag, or commit SHA)
tostringYesTarget ref to compare against
straightbooleanNoIf true, computes the diff directly between from and to instead of using the merge base

Get a file’s raw content and metadata (size, encoding, last commit) from a GitLab repository at a specific ref.

NameTypeRequiredDescription
project_idstringYesProject ID or path
file_pathstringYesURL-encoded file path within the repository (e.g., src%2Findex.ts)
refstringYesBranch, tag, or commit SHA to read the file from

Create a new file in a GitLab repository. The file content must be provided as a plain string (GitLab handles base64 encoding internally).

NameTypeRequiredDescription
project_idstringYesProject ID or path
file_pathstringYesPath of the new file within the repository (e.g., src/config.json)
branchstringYesBranch to commit the new file to
contentstringYesFile content as a string
commit_messagestringYesCommit message
author_namestringNoAuthor name override
author_emailstringNoAuthor email override

Update the content of an existing file in a GitLab repository. The current file must exist at the specified path and branch.

NameTypeRequiredDescription
project_idstringYesProject ID or path
file_pathstringYesPath of the file to update
branchstringYesBranch containing the file
contentstringYesNew file content
commit_messagestringYesCommit message
last_commit_idstringNoThe commit SHA of the last known version of the file. Used for conflict detection — GitLab rejects the update if the file has changed since this SHA
author_namestringNoAuthor name override
author_emailstringNoAuthor email override

Delete a file from a GitLab repository.

NameTypeRequiredDescription
project_idstringYesProject ID or path
file_pathstringYesPath of the file to delete
branchstringYesBranch to delete the file from
commit_messagestringYesCommit message
author_namestringNoAuthor name override
author_emailstringNoAuthor email override

List files and directories in a GitLab repository at a given path and ref.

NameTypeRequiredDescription
project_idstringYesProject ID or path
pathstringNoDirectory path within the repository. Defaults to the root (/)
refstringNoBranch, tag, or commit SHA. Defaults to the project’s default branch
recursivebooleanNoIf true, lists files recursively across all subdirectories
pagenumberNoPage number
per_pagenumberNoResults per page. Max 100

List issues for a GitLab project with extensive filtering options.

NameTypeRequiredDescription
project_idstringYesProject ID or path
statestringNoFilter by state: opened, closed, or all. Defaults to opened
labelsstringNoComma-separated label names to filter by
milestonestringNoMilestone title to filter by
assignee_idnumberNoFilter by assignee user ID
author_idnumberNoFilter by author user ID
searchstringNoSearch in title and description
created_afterstringNoISO 8601 datetime — issues created after this date
created_beforestringNoISO 8601 datetime — issues created before this date
updated_afterstringNoISO 8601 datetime — issues updated after this date
updated_beforestringNoISO 8601 datetime — issues updated before this date
order_bystringNoSort by: created_at, updated_at, priority, due_date, relative_position. Defaults to created_at
sortstringNoasc or desc
pagenumberNoPage number
per_pagenumberNoResults per page. Max 100

Get a specific issue by its project-level internal ID (IID). The IID is the number shown in the GitLab UI (e.g., #42).

NameTypeRequiredDescription
project_idstringYesProject ID or path
issue_iidnumberYesIssue internal ID (IID) — the number shown in the GitLab UI

Create a new issue in a GitLab project.

NameTypeRequiredDescription
project_idstringYesProject ID or path
titlestringYesIssue title
descriptionstringNoIssue body — supports GitLab Flavored Markdown and quick actions (e.g., /assign @user, /label ~bug)
assignee_idsarrayNoArray of user IDs to assign
milestone_idnumberNoID of the milestone to link
labelsstringNoComma-separated label names to apply
due_datestringNoDue date in YYYY-MM-DD format
weightnumberNoIssue weight (integer). GitLab Premium+
confidentialbooleanNoMark the issue as confidential

Update an existing issue. Only fields you provide are changed.

NameTypeRequiredDescription
project_idstringYesProject ID or path
issue_iidnumberYesIssue IID
titlestringNoNew title
descriptionstringNoNew description
state_eventstringNoclose or reopen
assignee_idsarrayNoNew array of assignee user IDs (replaces existing)
milestone_idnumberNoNew milestone ID. Pass 0 to remove the milestone
labelsstringNoComma-separated new label list (replaces all existing labels)
add_labelsstringNoComma-separated labels to add without removing existing ones
remove_labelsstringNoComma-separated labels to remove
due_datestringNoNew due date (YYYY-MM-DD). Pass empty string to clear
weightnumberNoNew weight. GitLab Premium+
confidentialbooleanNoUpdate confidentiality

Permanently delete an issue from a GitLab project. Requires project Owner role or admin access. This action cannot be undone.

NameTypeRequiredDescription
project_idstringYesProject ID or path
issue_iidnumberYesIssue IID

List all comments (notes) on a specific issue.

NameTypeRequiredDescription
project_idstringYesProject ID or path
issue_iidnumberYesIssue IID
sortstringNoasc or desc. Defaults to asc
order_bystringNoSort by created_at or updated_at
pagenumberNoPage number
per_pagenumberNoResults per page. Max 100

Add a comment to a specific issue. Supports GitLab Flavored Markdown and quick actions.

NameTypeRequiredDescription
project_idstringYesProject ID or path
issue_iidnumberYesIssue IID
bodystringYesComment text. Supports Markdown and quick actions (e.g., /close, /assign @user)
created_atstringNoISO 8601 datetime override for the note timestamp. Requires admin access

Update the content of an existing comment on an issue.

NameTypeRequiredDescription
project_idstringYesProject ID or path
issue_iidnumberYesIssue IID
note_idnumberYesNote (comment) ID
bodystringYesNew comment content

Delete a comment from a specific issue.

NameTypeRequiredDescription
project_idstringYesProject ID or path
issue_iidnumberYesIssue IID
note_idnumberYesNote ID to delete

List merge requests for a GitLab project with filtering by state, labels, assignee, and more.

NameTypeRequiredDescription
project_idstringYesProject ID or path
statestringNoFilter by state: opened, closed, merged, locked, or all. Defaults to opened
labelsstringNoComma-separated label names to filter by
milestonestringNoMilestone title to filter by
author_idnumberNoFilter by author user ID
assignee_idnumberNoFilter by assignee user ID
reviewer_idnumberNoFilter by reviewer user ID
source_branchstringNoFilter by source branch name
target_branchstringNoFilter by target branch name
searchstringNoSearch in title and description
created_afterstringNoISO 8601 datetime
created_beforestringNoISO 8601 datetime
order_bystringNoSort by created_at, updated_at, or title
sortstringNoasc or desc
pagenumberNoPage number
per_pagenumberNoResults per page. Max 100

Get a specific merge request by its project-level IID.

NameTypeRequiredDescription
project_idstringYesProject ID or path
merge_request_iidnumberYesMerge request IID (the number shown in the GitLab UI, e.g., !12)

Create a new merge request in a GitLab project.

NameTypeRequiredDescription
project_idstringYesProject ID or path
source_branchstringYesBranch to merge from
target_branchstringYesBranch to merge into
titlestringYesMerge request title
descriptionstringNoMerge request body. Supports Markdown and quick actions (e.g., /assign @user, /label ~feature)
assignee_idsarrayNoArray of user IDs to assign
reviewer_idsarrayNoArray of user IDs to request review from
labelsstringNoComma-separated label names
milestone_idnumberNoMilestone ID to link
remove_source_branchbooleanNoDelete the source branch after merge
squashbooleanNoSquash all commits into one when merging
draftbooleanNoMark the merge request as a draft (cannot be merged until undrafted)

Update an existing merge request. Only the fields you provide are changed.

NameTypeRequiredDescription
project_idstringYesProject ID or path
merge_request_iidnumberYesMerge request IID
titlestringNoNew title
descriptionstringNoNew description
state_eventstringNoclose or reopen
target_branchstringNoNew target branch
assignee_idsarrayNoNew assignees (replaces existing)
reviewer_idsarrayNoNew reviewers
labelsstringNoNew labels (replaces existing)
add_labelsstringNoLabels to add without clearing existing ones
remove_labelsstringNoLabels to remove
milestone_idnumberNoNew milestone ID. Pass 0 to remove
remove_source_branchbooleanNoUpdate the remove-source-branch preference
squashbooleanNoUpdate the squash preference
draftbooleanNoMark as draft (true) or ready (false)

Merge an open merge request. The MR must be mergeable — all required approvals satisfied, no conflicts, and pipeline passing (if required by the project settings).

NameTypeRequiredDescription
project_idstringYesProject ID or path
merge_request_iidnumberYesMerge request IID
merge_commit_messagestringNoCustom merge commit message
squash_commit_messagestringNoCustom commit message when squashing
should_remove_source_branchbooleanNoOverride the remove-source-branch setting for this merge
squashbooleanNoOverride the squash setting for this merge
shastringNoIf provided, the MR is merged only if the HEAD of the source branch matches this SHA — prevents merging if the branch has been updated since you last checked

Approve a merge request. Requires GitLab Premium or higher. On GitLab Free, this endpoint returns 403 Forbidden.

NameTypeRequiredDescription
project_idstringYesProject ID or path
merge_request_iidnumberYesMerge request IID
shastringNoApprove only if the MR HEAD matches this SHA

Get the approval state of a merge request — who has approved and who is required to approve. Requires GitLab Premium or higher.

NameTypeRequiredDescription
project_idstringYesProject ID or path
merge_request_iidnumberYesMerge request IID

Get the full diff of a merge request — all changed files and their hunks. For large MRs, results are paginated.

NameTypeRequiredDescription
project_idstringYesProject ID or path
merge_request_iidnumberYesMerge request IID
pagenumberNoPage number
per_pagenumberNoResults per page

List all commits included in a specific merge request.

NameTypeRequiredDescription
project_idstringYesProject ID or path
merge_request_iidnumberYesMerge request IID

List all comments on a specific merge request.

NameTypeRequiredDescription
project_idstringYesProject ID or path
merge_request_iidnumberYesMerge request IID
sortstringNoasc or desc
order_bystringNoSort by created_at or updated_at
pagenumberNoPage number
per_pagenumberNoResults per page

Add a comment to a specific merge request. Supports Markdown and quick actions.

NameTypeRequiredDescription
project_idstringYesProject ID or path
merge_request_iidnumberYesMerge request IID
bodystringYesComment text

List pipelines for a GitLab project with filtering by status, ref, and date.

NameTypeRequiredDescription
project_idstringYesProject ID or path
statusstringNoFilter by status: created, waiting_for_resource, preparing, pending, running, success, failed, canceled, skipped, manual, scheduled
refstringNoFilter by branch or tag name
shastringNoFilter by commit SHA
updated_afterstringNoISO 8601 datetime
updated_beforestringNoISO 8601 datetime
order_bystringNoSort by id, status, ref, or updated_at
sortstringNoasc or desc
pagenumberNoPage number
per_pagenumberNoResults per page. Max 100

Get detailed information about a specific pipeline, including status, duration, and triggered user.

NameTypeRequiredDescription
project_idstringYesProject ID or path
pipeline_idnumberYesPipeline ID

Trigger a new CI/CD pipeline for a specific branch or tag.

Important: On GitLab.com, triggering pipelines via API requires the authenticated user to have completed identity verification at https://gitlab.com/-/profile/verify. Without verification, the API returns 403 Forbidden.

NameTypeRequiredDescription
project_idstringYesProject ID or path
refstringYesBranch name, tag name, or commit SHA to run the pipeline on
variablesarrayNoArray of { "key": "VAR_NAME", "value": "VALUE" } objects to pass as pipeline variables

Cancel a running pipeline. Only pipelines in pending or running state can be canceled.

NameTypeRequiredDescription
project_idstringYesProject ID or path
pipeline_idnumberYesPipeline ID

Retry all failed jobs in a pipeline. Returns the updated pipeline object.

NameTypeRequiredDescription
project_idstringYesProject ID or path
pipeline_idnumberYesPipeline ID

Delete a pipeline and its associated job traces and artifacts. This action is permanent and cannot be undone.

NameTypeRequiredDescription
project_idstringYesProject ID or path
pipeline_idnumberYesPipeline ID

List all jobs in a specific pipeline, including their status, stage, name, and duration.

NameTypeRequiredDescription
project_idstringYesProject ID or path
pipeline_idnumberYesPipeline ID
scopestring or arrayNoFilter by job status: created, pending, running, failed, success, canceled, skipped, manual
pagenumberNoPage number
per_pagenumberNoResults per page. Max 100

List all jobs for a GitLab project across all pipelines.

NameTypeRequiredDescription
project_idstringYesProject ID or path
scopestring or arrayNoFilter by job status
pagenumberNoPage number
per_pagenumberNoResults per page. Max 100

Get detailed information about a specific CI/CD job.

NameTypeRequiredDescription
project_idstringYesProject ID or path
job_idnumberYesJob ID

Cancel a specific CI/CD job. The job must be in pending or running state.

NameTypeRequiredDescription
project_idstringYesProject ID or path
job_idnumberYesJob ID

Retry a specific CI/CD job. Creates a new job run with the same configuration.

NameTypeRequiredDescription
project_idstringYesProject ID or path
job_idnumberYesJob ID

Get the full trace/log output of a CI/CD job. Returns raw text.

NameTypeRequiredDescription
project_idstringYesProject ID or path
job_idnumberYesJob ID

Download the artifacts archive of a specific CI/CD job as a binary ZIP file.

NameTypeRequiredDescription
project_idstringYesProject ID or path
job_idnumberYesJob ID

List all CI/CD variables configured for a GitLab project. Variable values for masked variables are hidden (shown as null).

NameTypeRequiredDescription
project_idstringYesProject ID or path
pagenumberNoPage number
per_pagenumberNoResults per page

Get a specific CI/CD variable by key.

NameTypeRequiredDescription
project_idstringYesProject ID or path
keystringYesVariable key name

Create a new CI/CD variable for a GitLab project. Use masked to prevent the value from appearing in job logs.

NameTypeRequiredDescription
project_idstringYesProject ID or path
keystringYesVariable key name (uppercase letters, digits, and underscores only)
valuestringYesVariable value
variable_typestringNoenv_var (default) or file — file variables are written to a temp file and the path is passed as the variable value
protectedbooleanNoIf true, the variable is only exposed on protected branches and tags
maskedbooleanNoIf true, the variable value is hidden in job logs
environment_scopestringNoLimit variable to a specific environment (e.g., production). Use * for all environments

Update an existing CI/CD variable.

NameTypeRequiredDescription
project_idstringYesProject ID or path
keystringYesVariable key to update
valuestringNoNew value
variable_typestringNoenv_var or file
protectedbooleanNoNew protected flag
maskedbooleanNoNew masked flag
environment_scopestringNoNew environment scope

Delete a CI/CD variable from a GitLab project.

NameTypeRequiredDescription
project_idstringYesProject ID or path
keystringYesVariable key to delete

List all groups accessible to the authenticated user.

NameTypeRequiredDescription
searchstringNoFilter groups by name
ownedbooleanNoReturn only groups the user owns
order_bystringNoSort by name, path, id, or similarity
sortstringNoasc or desc
pagenumberNoPage number
per_pagenumberNoResults per page. Max 100

Get a specific group by numeric ID or URL-encoded path.

NameTypeRequiredDescription
group_idstringYesNumeric group ID or URL-encoded path (e.g., 42 or my-company)

Create a new GitLab group or subgroup.

NameTypeRequiredDescription
namestringYesGroup name
pathstringYesGroup path (URL slug)
descriptionstringNoGroup description
visibilitystringNopublic, internal, or private. Defaults to private
parent_idnumberNoParent group ID. Provide to create a subgroup

Update a GitLab group’s settings. Requires Maintainer or Owner role on the group.

NameTypeRequiredDescription
group_idstringYesGroup ID or path
namestringNoNew group name
pathstringNoNew group path
descriptionstringNoNew description
visibilitystringNoNew visibility setting

Delete a GitLab group and all projects within it. This is an asynchronous operation. Requires Owner role. This action cannot be undone.

NameTypeRequiredDescription
group_idstringYesGroup ID or path

List all projects belonging to a specific group.

NameTypeRequiredDescription
group_idstringYesGroup ID or path
searchstringNoFilter projects by name
visibilitystringNoFilter by visibility
order_bystringNoSort by id, name, path, created_at, updated_at, last_activity_at
sortstringNoasc or desc
pagenumberNoPage number
per_pagenumberNoResults per page. Max 100

List members of a GitLab group, including their access level and expiry date.

NameTypeRequiredDescription
group_idstringYesGroup ID or path
searchstringNoFilter members by name or username
pagenumberNoPage number
per_pagenumberNoResults per page. Max 100

Add a user to a GitLab group with a specified access level.

NameTypeRequiredDescription
group_idstringYesGroup ID or path
user_idnumberYesID of the user to add
access_levelnumberYesAccess level: 10 = Guest, 20 = Reporter, 30 = Developer, 40 = Maintainer, 50 = Owner
expires_atstringNoMembership expiry date in YYYY-MM-DD format

Remove a member from a GitLab group.

NameTypeRequiredDescription
group_idstringYesGroup ID or path
user_idnumberYesID of the user to remove

List members of a GitLab project, including their access level.

NameTypeRequiredDescription
project_idstringYesProject ID or path
searchstringNoFilter members by name or username
pagenumberNoPage number
per_pagenumberNoResults per page. Max 100

Add a user to a GitLab project with a specified access level.

NameTypeRequiredDescription
project_idstringYesProject ID or path
user_idnumberYesID of the user to add
access_levelnumberYesAccess level: 10 = Guest, 20 = Reporter, 30 = Developer, 40 = Maintainer, 50 = Owner
expires_atstringNoMembership expiry date in YYYY-MM-DD format

Remove a member from a GitLab project.

NameTypeRequiredDescription
project_idstringYesProject ID or path
user_idnumberYesID of the user to remove

Get the profile of the currently authenticated user — useful for resolving the user’s ID, username, and namespace before making other calls.

This tool takes no parameters.

Get a specific user’s public profile by numeric user ID.

NameTypeRequiredDescription
user_idnumberYesNumeric user ID

List users. Supports filtering by username, search term, and active status. Admin access is required to list all users; otherwise only publicly visible users are returned.

NameTypeRequiredDescription
searchstringNoFilter by name, username, or email
usernamestringNoExact username match
activebooleanNoReturn only active users
blockedbooleanNoReturn only blocked users (admin only)
pagenumberNoPage number
per_pagenumberNoResults per page. Max 100

List all projects owned by a specific user.

NameTypeRequiredDescription
user_idnumberYesUser ID
visibilitystringNoFilter by visibility
order_bystringNoSort order
pagenumberNoPage number
per_pagenumberNoResults per page. Max 100

List all SSH keys for the currently authenticated user.

This tool takes no parameters.

Add a new SSH public key to the currently authenticated user’s account.

NameTypeRequiredDescription
titlestringYesLabel for the key (e.g., Work MacBook)
keystringYesFull SSH public key string (e.g., ssh-ed25519 AAAA...)
expires_atstringNoKey expiry date in ISO 8601 format

List milestones for a GitLab project.

NameTypeRequiredDescription
project_idstringYesProject ID or path
statestringNoFilter by state: active or closed. Defaults to active
searchstringNoSearch milestones by title
pagenumberNoPage number
per_pagenumberNoResults per page

Get a specific project milestone by ID.

NameTypeRequiredDescription
project_idstringYesProject ID or path
milestone_idnumberYesMilestone ID (not IID — use the numeric ID returned from gitlab_milestones_list)

Create a new milestone in a GitLab project.

NameTypeRequiredDescription
project_idstringYesProject ID or path
titlestringYesMilestone title
descriptionstringNoMilestone description
due_datestringNoDue date in YYYY-MM-DD format
start_datestringNoStart date in YYYY-MM-DD format

Update an existing milestone.

NameTypeRequiredDescription
project_idstringYesProject ID or path
milestone_idnumberYesMilestone ID
titlestringNoNew title
descriptionstringNoNew description
due_datestringNoNew due date
start_datestringNoNew start date
state_eventstringNoclose or activate

Permanently delete a milestone. Issues and merge requests linked to it will lose their milestone association.

NameTypeRequiredDescription
project_idstringYesProject ID or path
milestone_idnumberYesMilestone ID

List all labels defined in a GitLab project.

NameTypeRequiredDescription
project_idstringYesProject ID or path
searchstringNoFilter labels by name
pagenumberNoPage number
per_pagenumberNoResults per page

Create a new label in a GitLab project.

NameTypeRequiredDescription
project_idstringYesProject ID or path
namestringYesLabel name
colorstringYesLabel color in #RRGGBB hex format (e.g., #FF5733)
descriptionstringNoLabel description
prioritynumberNoNumeric priority. Used for ordering in the label list

List all releases for a GitLab project.

NameTypeRequiredDescription
project_idstringYesProject ID or path
order_bystringNoSort by released_at or created_at
sortstringNoasc or desc
pagenumberNoPage number
per_pagenumberNoResults per page. Max 100

Get a specific release by its tag name.

NameTypeRequiredDescription
project_idstringYesProject ID or path
tag_namestringYesTag name the release is associated with

Create a new release associated with an existing tag.

NameTypeRequiredDescription
project_idstringYesProject ID or path
tag_namestringYesTag to associate this release with. The tag must already exist
namestringNoRelease name (e.g., v1.2.0)
descriptionstringNoRelease notes in Markdown format
released_atstringNoISO 8601 datetime for the release date. Defaults to now
assetsobjectNoRelease assets object: { "links": [{ "name": "Binary", "url": "https://..." }] }

Update an existing release’s name or description.

NameTypeRequiredDescription
project_idstringYesProject ID or path
tag_namestringYesTag name of the release to update
namestringNoNew release name
descriptionstringNoNew release notes
released_atstringNoNew release date
milestonesarrayNoArray of milestone titles to associate with the release

Delete a release from a GitLab project. The associated tag is not deleted.

NameTypeRequiredDescription
project_idstringYesProject ID or path
tag_namestringYesTag name of the release to delete

List all webhooks configured for a GitLab project.

NameTypeRequiredDescription
project_idstringYesProject ID or path

Get details of a specific webhook including its URL, enabled triggers, and SSL verification setting.

NameTypeRequiredDescription
project_idstringYesProject ID or path
webhook_idnumberYesWebhook ID

Create a new webhook for a GitLab project. GitLab will send HTTP POST requests to the URL when the selected events occur.

NameTypeRequiredDescription
project_idstringYesProject ID or path
urlstringYesHTTPS endpoint to receive webhook payloads
tokenstringNoSecret token sent in the X-Gitlab-Token header for request verification
push_eventsbooleanNoTrigger on push events
issues_eventsbooleanNoTrigger on issue events
merge_requests_eventsbooleanNoTrigger on merge request events
tag_push_eventsbooleanNoTrigger on tag push events
pipeline_eventsbooleanNoTrigger on pipeline status changes
job_eventsbooleanNoTrigger on job status changes
releases_eventsbooleanNoTrigger on release events
enable_ssl_verificationbooleanNoVerify the webhook endpoint’s SSL certificate. Defaults to true

Update an existing webhook’s URL, token, or event triggers.

NameTypeRequiredDescription
project_idstringYesProject ID or path
webhook_idnumberYesWebhook ID
urlstringNoNew endpoint URL
tokenstringNoNew secret token
push_eventsbooleanNoUpdate push event trigger
issues_eventsbooleanNoUpdate issues event trigger
merge_requests_eventsbooleanNoUpdate MR event trigger
pipeline_eventsbooleanNoUpdate pipeline event trigger
enable_ssl_verificationbooleanNoUpdate SSL verification

Delete a webhook from a GitLab project. The endpoint will stop receiving events immediately.

NameTypeRequiredDescription
project_idstringYesProject ID or path
webhook_idnumberYesWebhook ID

List all deploy keys configured for a GitLab project.

NameTypeRequiredDescription
project_idstringYesProject ID or path

Create a new deploy key for a GitLab project. Deploy keys provide read-only (or read-write) SSH access to a single repository without user credentials — ideal for CI/CD systems and automation.

NameTypeRequiredDescription
project_idstringYesProject ID or path
titlestringYesLabel for the deploy key (e.g., CI Server)
keystringYesFull SSH public key string
can_pushbooleanNoIf true, the key has write (push) access. Defaults to false (read-only)

Delete a deploy key from a GitLab project.

NameTypeRequiredDescription
project_idstringYesProject ID or path
deploy_key_idnumberYesDeploy key ID

List all snippets in a GitLab project.

NameTypeRequiredDescription
project_idstringYesProject ID or path
pagenumberNoPage number
per_pagenumberNoResults per page

Get a specific snippet from a GitLab project, including its title, description, and file names.

NameTypeRequiredDescription
project_idstringYesProject ID or path
snippet_idnumberYesSnippet ID

Create a new code snippet in a GitLab project.

NameTypeRequiredDescription
project_idstringYesProject ID or path
titlestringYesSnippet title
file_namestringNoFile name (used for syntax highlighting)
contentstringYesSnippet content
descriptionstringNoSnippet description
visibilitystringNopublic, internal, or private. Defaults to private