Help us learn about your current experience with the documentation. Take the survey.

GitLab MCP server tools

  • Tier: Free, Premium, Ultimate
  • Offering: GitLab.com, GitLab Self-Managed, GitLab Dedicated
  • Status: Beta

To provide feedback on this feature, leave a comment on issue 561564.

The GitLab MCP server provides a set of tools that integrate with your existing GitLab workflows. You can use these tools to interact directly with GitLab and perform common GitLab operations.

get_mcp_server_version

Returns the current version of the GitLab MCP server.

Example:

What version of the GitLab MCP server am I connected to?

create_issue

Creates a new issue in a GitLab project.

ParameterTypeRequiredDescription
idstringYesID or URL-encoded path of the project.
titlestringYesTitle of the issue.
descriptionstringNoDescription of the issue.
assignee_idsarray of integersNoArray of IDs of assigned users.
milestone_idintegerNoID of the milestone.
labelsarray of stringsNoArray of label names.
confidentialbooleanNoSets the issue to confidential. Default is false.
epic_idintegerNoID of the linked epic.

Example:

Create a new issue titled "Fix login bug" in project 123 with description
"Users cannot log in with special characters in password"

get_issue

Retrieves detailed information about a specific GitLab issue.

ParameterTypeRequiredDescription
idstringYesID or URL-encoded path of the project.
issue_iidintegerYesInternal ID of the issue.

Example:

Get details for issue 42 in project 123

create_merge_request

Creates a merge request in a GitLab project.

ParameterTypeRequiredDescription
idstringYesID or URL-encoded path of the project.
titlestringYesTitle of the merge request.
source_branchstringYesName of the source branch.
target_branchstringYesName of the target branch.
target_project_idintegerNoID of the target project.
assignee_idsarray of integersNoArray of IDs of merge request assignees. Set to 0 or an empty value to unassign all assignees.
reviewer_idsarray of integersNoArray of IDs of merge request reviewers. Set to 0 or an empty value to unassign all reviewers.
descriptionstringNoDescription of the merge request.
labelsarray of stringsNoArray of label names. Set to an empty string to unassign all labels.
milestone_idintegerNoID of the milestone.

Example:

Create a merge request in project gitlab-org/gitlab titled "Bug fix broken specs"
from branch "fix/specs-broken" into "master" and enable squash

get_merge_request

Retrieves a merge request and, optionally, its diffs, commits, notes, pipelines, or discussions. Only the base merge request is returned unless you request associated data with the include parameter.

ParameterTypeRequiredDescription
urlstringNoGitLab URL of the merge request. Provide this, or project_id and merge_request_iid.
project_idstringNoID or URL-encoded path of the project. Required if url is missing.
merge_request_iidintegerNoInternal ID of the merge request. Required if url is missing.
includearrayNoAssociated facets to return with the merge request. One of diffs, commits, notes, pipelines, or discussions. Limited to one facet per call.
notes_afterstringNoCursor for forward pagination of notes. Applies only when include is ["notes"].
notes_firstintegerNoNumber of notes to return after the cursor, up to 100. Applies only when include is ["notes"].

The diffs facet returns change statistics only: overall totals and per-file additions and deletions. To get patch text, use get_merge_request_diffs.

Example:

Get merge request 15 in project gitlab-org/gitlab with its commits

list_duo_sessions

Lists your GitLab Duo Agent Platform sessions, excluding Duo Chat sessions. Each session includes its individual status, goal preview, flow definition, and creation timestamp. Project sessions also include a session URL. The goal preview might be truncated.

ParameterTypeRequiredDescription
urlstringNoGitLab URL of the project to filter sessions by. Do not use with project_id.
project_idstringNoNumeric ID or full path of the project to filter sessions by. Do not use with url.
status_groupstringNoSession status group. One of active, paused, awaiting_input, completed, failed, or canceled.
afterstringNoCursor for forward pagination.
firstintegerNoNumber of sessions to return for forward pagination. Default is 20, maximum is 100.

The status_group filter can return sessions with multiple individual statuses. Each call returns a single page of results. If more pages exist, the response includes pageInfo.endCursor that you can pass as after.

Example:

List my active Duo Agent Platform sessions in gitlab-org/gitlab

list_merge_requests

Lists or searches merge requests in a GitLab project, returning compact merge request metadata.

ParameterTypeRequiredDescription
urlstringNoURL of the project. Provide exactly one of url or project_id.
project_idstringNoID or full path of the project. Provide exactly one of url or project_id.
author_usernamestringNoFilter by the username of the merge request author.
assignee_usernamestringNoFilter by the username of an assignee.
reviewer_usernamestringNoFilter by the username of a reviewer.
statestringNoFilter by state. One of opened, closed, merged, locked, or all. Omit to include any state.
scopestringNoFilter relative to the authenticated user. One of created_by_me, assigned_to_me, or review_requested. An explicit username wins for that field.
milestonestringNoFilter by the title of the milestone.
labelsstringNoComma-separated list of label names. Only merge requests with all of these labels are returned.
searchstringNoSearch query matched against merge request title and description.
afterstringNoCursor for forward pagination.
firstintegerNoNumber of merge requests to return for forward pagination. Default is 20, maximum is 100.

To retrieve a single merge request in full detail, use get_merge_request. Its diffs, commits, and notes are available from get_merge_request_diffs, get_merge_request_commits, and get_merge_request_notes. For full-text search across resource types, use search.

Example:

List my open merge requests in gitlab-org/gitlab

get_merge_request_commits

Retrieves the list of commits in a specific GitLab merge request.

ParameterTypeRequiredDescription
idstringYesID or URL-encoded path of the project.
merge_request_iidintegerYesInternal ID of the merge request.
per_pageintegerNoNumber of commits per page.
pageintegerNoCurrent page number.

Example:

Show me all commits in merge request 42 from project 123

get_merge_request_diffs

Retrieves the diffs for a specific GitLab merge request.

ParameterTypeRequiredDescription
idstringYesID or URL-encoded path of the project.
merge_request_iidintegerYesInternal ID of the merge request.
per_pageintegerNoNumber of diffs per page.
pageintegerNoCurrent page number.

Example:

What files were changed in merge request 25 in the gitlab project?

get_merge_request_pipelines

Retrieves the pipelines for a specific GitLab merge request.

ParameterTypeRequiredDescription
idstringYesID or URL-encoded path of the project.
merge_request_iidintegerYesInternal ID of the merge request.

Example:

Show me all pipelines for merge request 42 in project gitlab-org/gitlab

create_merge_request_note

Adds a comment or reply to a discussion on a GitLab merge request as the authenticated user.

ParameterTypeRequiredDescription
urlstringNoURL of the GitLab merge request. Required if project_id and merge_request_iid are missing.
project_idstringNoID or URL-encoded path of the project. Required if url is missing.
merge_request_iidintegerNoInternal ID of the merge request. Required if url is missing.
bodystringYesContent of the note. Lines cannot start with / to avoid triggering quick actions (for example, /merge).
discussion_idstringNoGlobal ID of the discussion to reply to (in the format gid://gitlab/Discussion/<id>). If missing, creates a new top-level note.

Example:

Reply "Thanks, fixed in the latest push" to merge request 42 in project gitlab-org/gitlab

get_merge_request_notes

Retrieves the notes (comments and system notes) for a specific GitLab merge request.

ParameterTypeRequiredDescription
urlstringNoURL of the GitLab merge request. Required if project_id and merge_request_iid are missing.
project_idstringNoID or URL-encoded path of the project. Required if url is missing.
merge_request_iidintegerNoInternal ID of the merge request. Required if url is missing.
afterstringNoCursor for forward pagination.
beforestringNoCursor for backward pagination.
firstintegerNoNumber of notes to return for forward pagination.
lastintegerNoNumber of notes to return for backward pagination.

Each returned note includes its discussion ID, so related notes can be grouped into threads.

Example:

Show me all comments on merge request 5 in project gitlab-org/gitlab

save_merge_request_review

Writes merge request review artifacts as the authenticated user. Each call performs exactly one operation, selected with the method parameter:

MethodAction
create_noteAdds a top-level comment.
reply_discussionReplies in an existing discussion.
create_diff_noteComments on a specific diff line.
resolve_discussionResolves or unresolves a discussion.
submit_reviewPosts multiple diff comments and an optional summary in one call.
post_duo_reviewAsks GitLab Duo to review the merge request. Requires GitLab Duo Code Review.
ParameterTypeRequiredDescription
urlstringNoURL of the GitLab merge request. Required if project_id and merge_request_iid are missing.
project_idstringNoID or path of the project. Required if url is missing.
merge_request_iidintegerNoInternal ID of the merge request. Required if url is missing.
methodstringYesThe operation to perform. Parameters that belong to a different method are rejected.
bodystringNoNote text. Required for create_note, reply_discussion, and create_diff_note. Lines cannot start with / to avoid triggering quick actions (for example, /merge).
discussion_idstringNoDiscussion to act on. Required for reply_discussion and resolve_discussion. Accepts a global ID or a bare discussion ID.
internalbooleanNoFor create_note, marks the note as internal.
resolvedbooleanNoFor resolve_discussion: true resolves, false unresolves. Required for that method.
old_pathstringNoFor create_diff_note, the file path before the change. Provide old_path or new_path, or both.
new_pathstringNoFor create_diff_note, the file path after the change.
old_lineintegerNoFor create_diff_note, the line number in the old version. Provide old_line or new_line, or both.
new_lineintegerNoFor create_diff_note, the line number in the new version.
commentsarrayNoFor submit_review, 1-20 diff comments. Each entry takes file and body (required), and old_line, new_line, and suggestion (optional). Required for that method. file is the post-change path; for renamed files, use create_diff_note instead.
verdictstringNoFor submit_review, an overall verdict prefixed to the summary note.
summarystringNoFor submit_review, a summary note posted after the diff comments.
summary_internalbooleanNoFor submit_review, marks the summary note as internal.

Example:

Review merge request 42 in project gitlab-org/gitlab and leave your findings as diff comments with a summary

add_branch

Adds a branch to a GitLab project from a source ref.

ParameterTypeRequiredDescription
urlstringNoGitLab URL of the project. Provide this, or project_id.
project_idstringNoID or path of the project. Required if url is not provided.
branchstringYesName of the new branch.
refstringYesBranch name or commit SHA to create the new branch from.

Example:

Create a branch named feature/x from main in project gitlab-org/gitlab

get_repository_file

Retrieves the contents of a single file from a repository at a specific ref.

Content comes from the repository, not from your local filesystem. The file is returned as committed at ref, so uncommitted changes in a local checkout are not included.

ParameterTypeRequiredDescription
urlstringNoURL of the file, for example https://gitlab.example.com/my-group/my-project/-/blob/main/app/models/user.rb. Provide this, or project_id, file_path, and ref.
project_idstringNoID or full path of the project. Required if url is not provided.
file_pathstringNoPath of the file relative to the repository root. Required if url is not provided.
refstringNoBranch name, tag name, or commit SHA. Use HEAD for the default branch. Required if url is not provided.
offsetintegerNoZero-indexed line to start reading from. Default is 0.
limitintegerNoMaximum number of lines to return. Default and maximum are 2000.

The response contains a metadata object with total_lines, returned_lines, truncated, and size_bytes. When the response covers only part of the file, system_instruction states the offset to use in the next call.

This tool returns text only. Binary files and files stored in Git LFS return an error. Files that a project excludes from GitLab Duo context also return an error.

Example:

Show me app/models/user.rb from the main branch of my-group/my-project

get_commit

Retrieves a single commit’s metadata, and optionally its diff or notes.

ParameterTypeRequiredDescription
urlstringNoURL of the GitLab commit. Required if project_id and commit_sha are not provided.
project_idstringNoID or URL-encoded path of the project. Required if url is not provided.
commit_shastringNoCommit to look up. Accepts a full or short SHA, branch name, or tag name. Required if url is not provided.
includearrayNoAssociated facet to fetch inline, one per call (diff or notes). Base metadata is always returned.
diff_detailstringNoLevel of detail in the commit diff. Applies only when include contains diff. Can be either stats or full_patch. Default is stats.
notes_afterstringNoToken to fetch the next page of notes. Applies only when include contains notes.
notes_firstintegerNoNumber of notes to return per page (maximum 100). Applies only when include contains notes.

With diff_detail set to stats, the diff facet returns per-file and summary line counts. With full_patch, it returns the patch text.

Example:

Show me commit abc123 in gitlab-org/gitlab with its diff stats

get_pipeline

Retrieves a pipeline, and optionally its jobs, downstream pipelines, or bridge (trigger) jobs.

ParameterTypeRequiredDescription
idstringYesID or full path of the project.
pipeline_idintegerYesID of the pipeline.
includearrayNoFacet to include alongside the pipeline, one per call: jobs, downstream_pipelines, or bridge_jobs.
job_statusstringNoFilters the jobs facet by status (for example, failed). Only applies when include is jobs.
firstintegerNoNumber of items to return for the selected include facet. Default is 20, maximum is 100.
afterstringNoCursor for forward pagination of the selected include facet. Use the previous response’s page_info.end_cursor.

A bridge job’s downstream_pipeline is omitted (null) both when the trigger job hasn’t triggered a downstream pipeline yet, and when you don’t have access to that pipeline.

Each downstream pipeline includes a project_full_path, because a downstream pipeline can belong to a different project. Use that value as the id of a follow-up call.

Examples:

  • Get a pipeline:

    Get the status of pipeline 12345 in project gitlab-org/gitlab
  • Get a pipeline’s failed jobs:

    Show me the failed jobs in pipeline 12345 for project gitlab-org/gitlab
  • Get a pipeline’s downstream pipelines:

    Show me the downstream pipelines triggered by pipeline 12345 in project gitlab-org/gitlab

get_pipeline_jobs

Retrieves the jobs for a specific GitLab CI/CD pipeline. To get jobs alongside the rest of the pipeline’s data in a single call, use the get_pipeline tool with include: jobs instead.

ParameterTypeRequiredDescription
idstringYesID or URL-encoded path of the project.
pipeline_idintegerYesID of the pipeline.
per_pageintegerNoNumber of jobs per page.
pageintegerNoCurrent page number.

Example:

Show me all jobs in pipeline 12345 for project gitlab-org/gitlab

get_job

Gets a CI/CD job’s metadata, and optionally its trace/log.

ParameterTypeRequiredDescription
idstringYesID or full path of the project.
job_idintegerYesID of the job.
includearrayNoFacet to include alongside the job, one per call: log.
byte_offsetintegerNoByte offset to start reading the job’s log from. Only applies when include is log. Default is 0.
byte_limitintegerNoMaximum number of bytes of the job’s log to return. Only applies when include is log. Default and maximum is 512000.

When the log is longer than byte_limit, the response reports the total size and tells you the byte_offset to use for the next window.

Examples:

  • Get a job’s metadata:

    Get the status of job 88 in project gitlab-org/gitlab
  • Get a job’s log:

    Show me the log output for job 88 in project gitlab-org/gitlab

list_pipelines

Lists pipelines in a GitLab project, with optional filters.

ParameterTypeRequiredDescription
idstringYesID or URL-encoded path of the project.
refstringNoBranch or tag name. Filters pipelines by ref.
statusstringNoFilters pipelines by status (for example, running, success, failed).
sourcestringNoFilters pipelines by source (for example, push, web, schedule).
created_afterstringNoReturns pipelines created after the specified datetime (ISO 8601 format).
created_beforestringNoReturns pipelines created before the specified datetime (ISO 8601 format).
order_bystringNoOrders pipelines by id, status, ref, updated_at, or user_id. Default is id.
sortstringNoSort direction, asc or desc. Default is desc.
pageintegerNoCurrent page number. Default is 1.
per_pageintegerNoNumber of items per page. Default is 20.

Child pipelines are excluded from the results by default. To return only child pipelines, set source to parent_pipeline.

The default order (id, desc) returns pipelines with the highest ID first. ID order usually matches creation order, but the two aren’t guaranteed to agree. Use created_after or created_before to filter by an explicit time boundary. A caller can page through results and stop at the first pipeline outside its target range.

Example:

List all failed pipelines on the main branch for project gitlab-org/gitlab

save_pipeline

Runs, retries, or cancels a CI/CD pipeline in a GitLab project. To update pipeline metadata or delete a pipeline, use the manage_pipeline tool instead. To list pipelines, use the list_pipelines tool instead.

ParameterTypeRequiredDescription
urlstringNoGitLab URL of the project. Used only to create a pipeline. Provide this, or project_id.
project_idstringNoID or full path of the project. Used only to create a pipeline. Provide this, or url.
pipeline_idintegerNoID of an existing pipeline to target. When set, requires action. Omit to create a new pipeline.
actionstringNoLifecycle action to perform on pipeline_id: retry or cancel. Required when pipeline_id is set.
refstringNoBranch or tag name. Required to create a pipeline (when pipeline_id is absent).
variablesarrayNoPipeline variables in array format ([{key, value, variable_type}]).
inputshashNoPipeline input parameters as key-value pairs.

Examples:

  • Create a pipeline:

    Create a pipeline on the main branch for project gitlab-org/gitlab
  • Retry a pipeline:

    Retry failed jobs in pipeline 12345 for project gitlab-org/gitlab
  • Cancel a pipeline:

    Cancel pipeline 12345 in project gitlab-org/gitlab

manage_pipeline

Updates pipeline metadata or deletes a pipeline in a GitLab project. To create, retry, or cancel a pipeline, use the save_pipeline tool instead. To list pipelines, use the list_pipelines tool instead.

ParameterTypeRequiredDescription
idstringYesID or URL-encoded path of the project.
pipeline_idintegerYesID of the pipeline. If only this parameter is set, deletes a pipeline and all related data.
namestringNoName of the pipeline. If this parameter and pipeline_id are set, updates the pipeline metadata.

Examples:

  • Update a pipeline:

    Rename pipeline 12345 to "My deploy pipeline" in project gitlab-org/gitlab
  • Delete a pipeline:

    Delete pipeline 12345 in project gitlab-org/gitlab

create_workitem_note

Creates a new note (comment) on a GitLab work item.

ParameterTypeRequiredDescription
bodystringYesContent of the note.
urlstringNoURL for the work item. Required if group_id or project_id and work_item_iid are missing.
group_idstringNoID or path of the group. Required if url and project_id are missing.
project_idstringNoID or path of the project. Required if url and group_id are missing.
work_item_iidintegerNoInternal ID of the work item. Required if url is missing.
internalbooleanNoMarks the note as internal (visible only to users with the Reporter, Developer, Maintainer, or Owner role for the project). Default is false.
discussion_idstringNoGlobal ID of the discussion to reply to (in the format gid://gitlab/Discussion/<id>).

Example:

Add a comment "This looks good to me" to work item 42 in project gitlab-org/gitlab

get_workitem_notes

Retrieves all notes (comments) for a specific GitLab work item.

ParameterTypeRequiredDescription
urlstringNoURL for the work item. Required if group_id or project_id and work_item_iid are missing.
group_idstringNoID or path of the group. Required if url and project_id are missing.
project_idstringNoID or path of the project. Required if url and group_id are missing.
work_item_iidintegerNoInternal ID of the work item. Required if url is missing.
afterstringNoCursor for forward pagination.
beforestringNoCursor for backward pagination.
firstintegerNoNumber of notes to return for forward pagination.
lastintegerNoNumber of notes to return for backward pagination.

Example:

Show me all comments on work item 42 in project gitlab-org/gitlab

Links a work item to one or more other work items with a relationship type.

ParameterTypeRequiredDescription
work_items_idsarray of stringsYesGlobal IDs of the work items to link to (in the format gid://gitlab/WorkItem/<id>). Maximum 10 items.
urlstringNoURL for the source work item. Required if group_id or project_id and work_item_iid are missing.
group_idstringNoID or path of the group. Required if url and project_id are missing.
project_idstringNoID or path of the project. Required if url and group_id are missing.
work_item_iidintegerNoInternal ID of the source work item. Required if url is missing.
link_typestringNoType of relationship. One of relates_to, blocks, or blocked_by. Default is relates_to. The blocks and blocked_by types require GitLab Premium or Ultimate.

Example:

Mark work item 42 in project gitlab-org/gitlab as blocked by work item 40

get_saved_view_work_items

Retrieves a saved view and its list of work items from a namespace. The tool applies the filters and the sort order in the saved view to the returned work items.

ParameterTypeRequiredDescription
saved_view_idstringYesGlobal ID of the saved view (in the format gid://gitlab/WorkItems::SavedViews::SavedView/<id>).
urlstringNoURL for the namespace (project or group). Required if group_id or project_id is missing.
group_idstringNoID or path of the group. Required if url and project_id are missing.
project_idstringNoID or path of the project. Required if url and group_id are missing.
afterstringNoCursor for forward pagination.
firstintegerNoNumber of work items to return. Maximum 100.

Example:

Show me the work items in this saved view: <URL>

save_work_item

Creates or updates a GitLab work item, such as an issue, task, or epic. Omit work_item_iid to create a new work item. Provide work_item_iid or a work item URL to update an existing one. The tool names create_work_item and update_work_item are aliases for this tool.

ParameterTypeRequiredDescription
urlstringNoGitLab URL for the project, group, or work item. Provide exactly one of url, project_id, or group_id.
group_idstringNoID or path of the group. Required if url and project_id are missing.
project_idstringNoID or path of the project. Required if url and group_id are missing.
work_item_iidintegerNoInternal ID of the work item to update. Omit to create a new work item.
titlestringNoTitle of the work item. Required when creating a work item.
type_namestringNoWork item type name, for example Issue, Task, or Epic. Required when creating a work item. Valid types depend on the namespace and license.
descriptionstringNoDescription in GitLab Flavored Markdown. Maximum 1,048,576 characters.
assignee_idsarray of integersNoUser IDs to assign to the work item. Maximum 100 items.
label_idsarray of stringsNoLabel IDs or global IDs. Create only; on update use add_label_ids or remove_label_ids. Maximum 100 items.
add_label_idsarray of stringsNoUpdate only. Label IDs or global IDs to add. Maximum 100 items.
remove_label_idsarray of stringsNoUpdate only. Label IDs or global IDs to remove. Maximum 100 items.
confidentialbooleanNoSets the work item confidentiality.
start_datestringNoStart date, in YYYY-MM-DD format.
due_datestringNoDue date, in YYYY-MM-DD format.
statestringNoUpdate only. closed closes the work item, opened reopens it.
parent_idstringNoGlobal ID or numeric ID of the parent work item.
todo_actionstringNoUpdate only. add adds a to-do for the current user, mark_as_done marks to-dos as done.
todo_idstringNoUpdate only. Global ID or numeric ID of the to-do. Omit to update all to-dos on the work item.
health_statusstringNoHealth status. One of onTrack, needsAttention, or atRisk. Ultimate only.
weightintegerNoWeight of the work item. Must be 0 or greater. Premium and Ultimate only.
clear_weightbooleanNoUpdate only. Removes the weight. Takes precedence over weight. Premium and Ultimate only.
status_idstringNoGlobal ID of the status to set. Premium and Ultimate only.
is_fixedbooleanNoWhether start and due dates are fixed. When false, dates roll up from child items and start_date and due_date are ignored. Premium and Ultimate only.
agent_planstringNoMarkdown content of the agent plan. Ultimate only. Requires the workplan feature.

Example:

Create a task "Update the onboarding guide" in project gitlab-org/gitlab and assign it to me

Searches for a term across the entire GitLab instance with the search API. This tool is available for global, group, and project search. Available scopes depend on the search type.

ParameterTypeRequiredDescription
scopestringYesSearch scope (for example, work_items, merge_requests, or projects).
searchstringYesSearch term.
group_idstringNoID or URL-encoded path of the group you want to search.
project_idstringNoID or URL-encoded path of the project you want to search.
statestringNoState of search results (for work_items and merge_requests).
confidentialbooleanNoFilters results by confidentiality (for work_items). Default is false.
fieldsarray of stringsNoArray of fields you want to search (for work_items and merge_requests).
order_bystringNoAttribute to order results by. Default is created_at for basic search and relevance for advanced search.
sortstringNoSort direction for results. Default is desc.
per_pageintegerNoNumber of results per page. Default is 20.
pageintegerNoCurrent page number. Default is 1.

Example:

Search issues for "flaky test" across GitLab

search_labels

Searches for labels in a GitLab project or group.

ParameterTypeRequiredDescription
full_pathstringYesFull path of the project or group (for example, group/project).
is_projectbooleanYesWhether to search in a project (true) or group (false).
searchstringNoSearch term to filter labels by title.

When you search group labels, the results include labels from ancestor and descendant groups.

Example:

Show me all labels in project gitlab-org/gitlab

list_wiki_pages

Lists the wiki pages in a GitLab project or group.

ParameterTypeRequiredDescription
project_idstringNoFull path or numeric ID of the project (for example, gitlab-org/gitlab or 278964).
group_idstringNoFull path or numeric ID of the group (for example, gitlab-org or 9970).
firstintegerNoNumber of wiki pages to return for forward pagination (maximum 100).
afterstringNoCursor for forward pagination.

Provide only one project_id or group_id. Each call returns a single page of results. If more pages exist, the response includes an end_cursor you can pass as after to fetch the next page.

Example:

List the wiki pages in gitlab-org/gitlab
  • Add-on: GitLab Duo Core, Pro, or Enterprise
  • Offering: GitLab.com, GitLab Self-Managed

The availability of this feature is controlled by a feature flag. For more information, see the history.

Searches for relevant code snippets in a GitLab project. For more information, including setup and enablement, see semantic code search.

ParameterTypeRequiredDescription
semantic_querystringYesSearch query for the code.
project_idstringYesID or path of the project.
directory_pathstringNoPath of the directory (for example, app/services/).
knnintegerNoNumber of nearest neighbors used to find similar code snippets. Default is 64.
limitintegerNoMaximum number of results to return. Default is 20.

For best results, describe the functionality or behavior you’re interested in rather than using generic keywords or specific function or variable names.

Example:

How are authorizations managed in this project?

attach_scan_profile

Attaches the given security scan profile to the specified projects, or to all projects under the specified groups.

ParameterTypeRequiredDescription
security_scan_profile_idstringYesGlobal ID of the security scan profile (for example, gid://gitlab/Security::ScanProfile/1).
project_idsarray of stringsNoArray of global IDs of projects (for example, [gid://gitlab/Project/1]). This is required unless group_ids is provided.
group_idsarray of stringsNoArray of global IDs of groups (for example, [gid://gitlab/Group/1]). This is required unless project_ids is provided.

Example:

Attach `gid://gitlab/Security::ScanProfile/1` to all projects under `gid://gitlab/Group/1`.