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.
| Parameter | Type | Required | Description |
|---|---|---|---|
url | string | No | GitLab 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_id | string | No | ID or path of the group. Required if url and project_id are missing. |
project_id | string | No | ID or path of the project. Required if url and group_id are missing. |
work_item_iid | integer | No | Internal ID of the work item. Required if url is missing. |
include | array | No | Associated 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_first | integer | No | Number of notes to return after the cursor (forward pagination). Default 100, maximum 100. |
notes_after | string | No | Cursor for forward pagination of notes. Use pageInfo.endCursor from a previous response. |
notes_last | integer | No | Number of notes to return before the cursor (backward pagination). Default 100, maximum 100. |
notes_before | string | No | Cursor for backward pagination of notes. Use pageInfo.startCursor from a previous response. |
discussions_first | integer | No | Number of discussions to return after the cursor. Default 20, maximum 100. |
discussions_after | string | No | Cursor for forward pagination of discussions. Use pageInfo.endCursor from a previous response. |
discussions_filter | string | No | Which discussions to return: all_notes (default), only_comments to leave out system notes, or only_activity for system notes only. |
related_merge_requests_first | integer | No | Number of related merge requests to return. Default 20, maximum 100. |
related_merge_requests_after | string | No | Cursor 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 requestsget_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.
| Parameter | Type | Required | Description |
|---|---|---|---|
url | string | No | URL for the work item. Required if group_id or project_id and work_item_iid are missing. |
group_id | string | No | ID or path of the group. Required if url and project_id are missing. |
project_id | string | No | ID or path of the project. Required if url and group_id are missing. |
work_item_iid | integer | No | Internal ID of the work item. Required if url is missing. |
after | string | No | Cursor for forward pagination. |
before | string | No | Cursor for backward pagination. |
first | integer | No | Number of notes to return for forward pagination. |
last | integer | No | Number of notes to return for backward pagination. |
Example:
Show me all comments on work item 42 in project gitlab-org/gitlabget_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.
| Parameter | Type | Required | Description |
|---|---|---|---|
url | string | No | GitLab URL for the namespace (project or group). Required if group_id and project_id are missing. |
group_id | string | No | ID or path of the group. Required if url and project_id are missing. |
project_id | string | No | ID or path of the project. Required if url and group_id are missing. |
Example:
List the work item types available in the gitlab-org grouplink_work_items
Links a work item to one or more other work items with a relationship type.
| Parameter | Type | Required | Description |
|---|---|---|---|
work_items_ids | array | Yes | Work 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. |
url | string | No | URL for the source work item. Required if group_id or project_id and work_item_iid are missing. |
group_id | string | No | ID or path of the group. Required if url and project_id are missing. |
project_id | string | No | ID or path of the project. Required if url and group_id are missing. |
work_item_iid | integer | No | Internal ID of the source work item. Required if url is missing. |
link_type | string | No | Type 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 40get_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.
| Parameter | Type | Required | Description |
|---|---|---|---|
saved_view_id | string | Yes | Numeric ID (for example, 42) or global ID (gid://gitlab/WorkItems::SavedViews::SavedView/42) of the saved view. |
url | string | No | URL for the namespace (project or group). Required if group_id or project_id is missing. |
group_id | string | No | ID or path of the group. Required if url and project_id are missing. |
project_id | string | No | ID or path of the project. Required if url and group_id are missing. |
after | string | No | Cursor for forward pagination. |
first | integer | No | Number 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.
| Parameter | Type | Required | Description |
|---|---|---|---|
url | string | No | URL for the project or group. |
group_id | string | No | ID or path of the group. |
project_id | string | No | ID or path of the project. |
search | string | No | Search saved views by name or description. |
subscribed_only | boolean | No | If true, returns only saved views you are subscribed to. |
sort | string | No | Sort 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. |
after | string | No | Cursor for forward pagination. |
first | integer | No | Number of saved views to return. Maximum 100. |
Example:
List the saved views in group gitlab-orgsave_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.
| Parameter | Type | Required | Description |
|---|---|---|---|
url | string | No | GitLab URL for the project, group, or work item. Provide exactly one of url, project_id, or group_id. |
group_id | string | No | ID or path of the group. Required if url and project_id are missing. |
project_id | string | No | ID or path of the project. Required if url and group_id are missing. |
work_item_iid | integer | No | Positive internal ID of the work item to update. Omit to create a new work item. |
title | string | No | Title of the work item. Required when creating a work item. |
type_name | string | No | Work item type name, for example Issue, Task, or Epic. Required when creating a work item. Valid types depend on the namespace and license. |
description | string | No | Description in GitLab Flavored Markdown. Maximum 1,048,576 characters. |
description_edits | array of objects | No | Update 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_ids | array of integers | No | User IDs to assign to the work item. Maximum 100 items. |
label_ids | array of strings | No | Label IDs or global IDs. Create only; on update use add_label_ids or remove_label_ids. Maximum 100 items. |
labels | array of strings | No | Names 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_ids | array of strings | No | Update only. Label IDs or global IDs to add. Maximum 100 items. |
add_labels | array of strings | No | Update only. Names of the labels to add. Maximum 100 items. |
remove_label_ids | array of strings | No | Update only. Label IDs or global IDs to remove. Maximum 100 items. |
remove_labels | array of strings | No | Update only. Names of the labels to remove. Maximum 100 items. |
milestone_id | string | No | ID 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. |
milestone | string | No | Title of the milestone to assign, resolved among the milestones of the project or group and its ancestor groups. |
clear_milestone | boolean | No | Update only. Removes the milestone. Cannot be used with milestone or milestone_id. |
confidential | boolean | No | Sets the work item confidentiality. |
start_date | string | No | Start date, in YYYY-MM-DD format. |
due_date | string | No | Due date, in YYYY-MM-DD format. |
state | string | No | Update only. closed closes the work item, opened reopens it. |
parent_id | string | No | Global ID or numeric ID of the parent work item. |
todo_action | string | No | Update only. add adds a to-do for the current user, mark_as_done marks to-dos as done. |
todo_id | string | No | Update only. Global ID or numeric ID of the to-do. Omit to update all to-dos on the work item. |
health_status | string | No | Health status. One of onTrack, needsAttention, or atRisk. Ultimate only. |
weight | integer | No | Weight of the work item. Must be 0 or greater. Premium and Ultimate only. |
clear_weight | boolean | No | Update only. Removes the weight. Takes precedence over weight. Premium and Ultimate only. |
status_id | string | No | Global ID of the status to set. Premium and Ultimate only. |
is_fixed | boolean | No | Whether 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_plan | string | No | Markdown content of the agent plan. Premium and Ultimate only. Requires the workplan feature. |
readiness_score | integer | No | Readiness 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 melist_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.
| Parameter | Type | Required | Description |
|---|---|---|---|
url | string | No | GitLab URL for the project or group. Provide exactly one of url, group_id, or project_id. |
group_id | string | No | ID or path of the group. Required if url and project_id are missing. |
project_id | string | No | ID or path of the project. Required if url and group_id are missing. |
state | string | No | Filter by state: opened, closed, or all (default). |
search | string | No | Free-text search in title and description. |
author_username | string | No | Username of the author. |
assignee_usernames | array | No | Usernames of assignees. A work item must match all of them. Maximum 100 values. |
label_name | array | No | Label names. A work item must have all of them. Maximum 100 values. |
milestone_title | array | No | Milestone titles. Cannot be combined with milestone_wildcard_id. Maximum 100 values. |
milestone_wildcard_id | string | No | NONE, ANY, STARTED, or UPCOMING. Cannot be combined with milestone_title. |
types | array | No | Work item types to include, for example ["ISSUE", "TASK"]. |
parent_iid | integer | No | IID of a parent work item in the given project or group. Returns its direct children. |
created_after | string | No | Created after this time (ISO 8601; date-only means start of day, offsets honored). |
created_before | string | No | Created before this time (ISO 8601; date-only means start of day, offsets honored). |
updated_after | string | No | Updated after this time (ISO 8601; date-only means start of day, offsets honored). |
updated_before | string | No | Updated before this time (ISO 8601; date-only means start of day, offsets honored). |
due_after | string | No | Due after this time (ISO 8601; date-only means start of day, offsets honored). |
due_before | string | No | Due before this time (ISO 8601; date-only means start of day, offsets honored). |
sort | string | No | Sort order, for example UPDATED_DESC. Default CREATED_DESC. |
first | integer | No | Number of work items to return. Default 20, maximum 100. |
after | string | No | Cursor for forward pagination. |
health_status_filter | string | No | Ultimate only. onTrack, needsAttention, or atRisk. |
status | object | No | Ultimate 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.
| Parameter | Type | Required | Description |
|---|---|---|---|
id | string | Yes | ID or full path of the project. |
title | string | Yes | Title of the issue. |
description | string | No | Description of the issue. |
assignee_ids | array of integers | No | Array of IDs of assigned users. |
milestone_id | integer | No | ID of the milestone. |
labels | array of strings | No | Array of label names. |
confidential | boolean | No | Sets the issue to confidential. Default is false. |
epic_id | integer | No | ID 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.
| Parameter | Type | Required | Description |
|---|---|---|---|
id | string | Yes | ID or full path of the project. |
issue_iid | integer | Yes | Internal ID of the issue. |
Example:
Get details for issue 42 in project 123