GitLab MCP server work item tools

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

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

These tools are part of the work_items toolset. Use them to create, update, read, list, and link work items, and list work item types and saved views.

For a list of all tools, see GitLab MCP server tools.

get_work_item

Retrieves a single work item (issue, epic, task, incident, objective, or key result) with its type, dates, assignees, labels, milestone, and parent. Optionally includes its notes, its discussions, or the merge requests related to it. Widgets the work item type does not support are omitted.

ParameterTypeRequiredDescription
urlstringNoGitLab URL of the work item (a /-/work_items/, /-/issues/, or /-/epics/ URL). Provide this, or work_item_iid with group_id or project_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. Required if url is missing.
includearrayNoAssociated data to return. Any of notes, discussions, or related_merge_requests. You can request several facets in one call. For the newest notes, use notes_last without notes_first or notes_after.
notes_firstintegerNoNumber of notes to return after the cursor (forward pagination). Default 100, maximum 100.
notes_afterstringNoCursor for forward pagination of notes. Use pageInfo.endCursor from a previous response.
notes_lastintegerNoNumber of notes to return before the cursor (backward pagination). Default 100, maximum 100.
notes_beforestringNoCursor for backward pagination of notes. Use pageInfo.startCursor from a previous response.
discussions_firstintegerNoNumber of discussions to return after the cursor. Default 20, maximum 100.
discussions_afterstringNoCursor for forward pagination of discussions. Use pageInfo.endCursor from a previous response.
discussions_filterstringNoWhich discussions to return: all_notes (default), only_comments to leave out system notes, or only_activity for system notes only.
related_merge_requests_firstintegerNoNumber of related merge requests to return. Default 20, maximum 100.
related_merge_requests_afterstringNoCursor for forward pagination of related merge requests.

The notes facet returns up to 100 notes per call and paginates in both directions with the notes_* parameters. Each note includes discussion.id, the ID of the thread it belongs to, so you can group notes by thread.

Use discussions for thread structure and resolution state, and notes for a flat chronological history.

The discussions facet returns the threads on the work item. Each discussion includes its resolvable and resolved state and its notes, so you can find the threads that are still unresolved. An unresolved thread has resolvable set to true and resolved set to false. It paginates forward only with the discussions_* parameters, and a discussion is never split across pages.

The related_merge_requests facet is empty for group work items such as epics.

Example:

Get issue 42 in project gitlab-org/gitlab with its related merge requests

get_workitem_notes

Superseded by get_work_item with include: ["notes"], which paginates notes in both directions. This tool no longer appears in tools/list but remains callable while callers migrate.

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

get_work_item_types

Lists the work item types available in a namespace (group or project), including system-defined types (such as Issue, Epic, and Task) and custom types. Each returned type includes its global ID, name, icon, and the widget types enabled on it, so you can avoid setting fields the type does not support.

For project-level types, get_project with include: ["work_item_types"] returns the same data alongside the project.

ParameterTypeRequiredDescription
urlstringNoGitLab URL for the namespace (project or group). Required if group_id and project_id 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.

Example:

List the work item types available in the gitlab-org group

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

ParameterTypeRequiredDescription
work_items_idsarrayYesWork items to link to: plain iids, resolved in the same project or group as the source, or global IDs (gid://gitlab/WorkItem/<id>) for work items in other projects or groups. 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. The output also includes the display settings of the saved view.

ParameterTypeRequiredDescription
saved_view_idstringYesNumeric ID (for example, 42) or global ID (gid://gitlab/WorkItems::SavedViews::SavedView/42) of the saved view.
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>

list_work_item_saved_views

Lists the work item saved views in a project or group. Provide exactly one of url, group_id, or project_id. Each saved view in the result has a numeric id. To get the filters and work items of one saved view, pass its id to get_saved_view_work_items.

ParameterTypeRequiredDescription
urlstringNoURL for the project or group.
group_idstringNoID or path of the group.
project_idstringNoID or path of the project.
searchstringNoSearch saved views by name or description.
subscribed_onlybooleanNoIf true, returns only saved views you are subscribed to.
sortstringNoSort order. ID sorts newest first. NAME_ASC sorts by name. RELATIVE_POSITION sorts by your order of subscribed views and requires subscribed_only: true. Default is ID.
afterstringNoCursor for forward pagination.
firstintegerNoNumber of saved views to return. Maximum 100.

Example:

List the saved views in group gitlab-org

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. Send only the fields you intend to set, and omit the rest. 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_iidintegerNoPositive internal 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.
description_editsarray of objectsNoUpdate only. Replacements applied to the current description in order, each with old_str and new_str. Each old_str must match exactly once. Cannot be used with description. Maximum 100 items.
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.
labelsarray of stringsNoNames of the labels to set, resolved in the project or group and its ancestor groups. Create only; on update use add_labels or remove_labels. Maximum 100 items.
add_label_idsarray of stringsNoUpdate only. Label IDs or global IDs to add. Maximum 100 items.
add_labelsarray of stringsNoUpdate only. Names of the labels to add. Maximum 100 items.
remove_label_idsarray of stringsNoUpdate only. Label IDs or global IDs to remove. Maximum 100 items.
remove_labelsarray of stringsNoUpdate only. Names of the labels to remove. Maximum 100 items.
milestone_idstringNoID or global ID of the milestone to assign, validated against the project or group and its ancestor groups. Wins over milestone when both are given.
milestonestringNoTitle of the milestone to assign, resolved among the milestones of the project or group and its ancestor groups.
clear_milestonebooleanNoUpdate only. Removes the milestone. Cannot be used with milestone or milestone_id.
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. Premium and Ultimate only. Requires the workplan feature.
readiness_scoreintegerNoReadiness score of the agent plan, from 0 to 100. Premium and Ultimate only. Requires the workplan feature.

Example:

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

list_work_items

Lists or searches work items (issues, incidents, test cases, requirements, tasks, tickets, objectives, key results, epics) in a group or project. Group scope includes work items of descendant projects and subgroups. Each result contains only the ID, IID, title, state, web URL, full reference, created and updated timestamps, and work item type, with cursor pagination. Use get_work_item to read one work item in depth.

ParameterTypeRequiredDescription
urlstringNoGitLab URL for the project or group. Provide exactly one of url, group_id, or project_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.
statestringNoFilter by state: opened, closed, or all (default).
searchstringNoFree-text search in title and description.
author_usernamestringNoUsername of the author.
assignee_usernamesarrayNoUsernames of assignees. A work item must match all of them. Maximum 100 values.
label_namearrayNoLabel names. A work item must have all of them. Maximum 100 values.
milestone_titlearrayNoMilestone titles. Cannot be combined with milestone_wildcard_id. Maximum 100 values.
milestone_wildcard_idstringNoNONE, ANY, STARTED, or UPCOMING. Cannot be combined with milestone_title.
typesarrayNoWork item types to include, for example ["ISSUE", "TASK"].
parent_iidintegerNoIID of a parent work item in the given project or group. Returns its direct children.
created_afterstringNoCreated after this time (ISO 8601; date-only means start of day, offsets honored).
created_beforestringNoCreated before this time (ISO 8601; date-only means start of day, offsets honored).
updated_afterstringNoUpdated after this time (ISO 8601; date-only means start of day, offsets honored).
updated_beforestringNoUpdated before this time (ISO 8601; date-only means start of day, offsets honored).
due_afterstringNoDue after this time (ISO 8601; date-only means start of day, offsets honored).
due_beforestringNoDue before this time (ISO 8601; date-only means start of day, offsets honored).
sortstringNoSort order, for example UPDATED_DESC. Default CREATED_DESC.
firstintegerNoNumber of work items to return. Default 20, maximum 100.
afterstringNoCursor for forward pagination.
health_status_filterstringNoUltimate only. onTrack, needsAttention, or atRisk.
statusobjectNoUltimate only. Filter by custom status name, for example {"name": "In progress"}.

Example:

List my open tasks in the gitlab-org group updated this month.

create_issue

Superseded by save_work_item, which resolves milestone titles and label names in the same places (the project and its ancestor groups) but is stricter about names it cannot find: create_issue creates label names that don’t exist yet and silently drops an unknown milestone title, while save_work_item returns an error naming anything it cannot find. This tool no longer appears in tools/list but remains callable while callers migrate.

Creates a new issue in a GitLab project.

ParameterTypeRequiredDescription
idstringYesID or full 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

Superseded by get_work_item, which covers issues and other work item types. This tool no longer appears in tools/list but remains callable while callers migrate.

Retrieves detailed information about a specific GitLab issue.

ParameterTypeRequiredDescription
idstringYesID or full path of the project.
issue_iidintegerYesInternal ID of the issue.

Example:

Get details for issue 42 in project 123