Skip to content

Latest commit

 

History

History
93 lines (63 loc) · 3.76 KB

labels.md

File metadata and controls

93 lines (63 loc) · 3.76 KB

Labels

Project label CRUD.

!!! note "Feature toggle" Opt-in. Enable via GITLAB_TOOLSETS=labels (or GITLAB_TOOLSETS=all), list individual tools in GITLAB_TOOLS=, or activate at runtime with the discover_tools MCP tool. 1 of these tools (list_labels) are already enabled by default via core; the toggle applies to the rest.

Tools in this group


list_labels

📖 Read-only

List labels for a project. For one known resource, use the matching get tool. Read-only; missing resources, denied access, and rate limits return errors. project_id/group_id take a numeric ID or URL-encoded path.

Parameters

Parameter Type Required Description
project_id string ✓ Project ID or URL-encoded path
with_counts boolean Whether to include issue and merge request counts
include_ancestor_groups boolean Include ancestor groups
search string Keyword to filter labels by
page number Page number for pagination (default: 1)
per_page number Number of items per page (max: 100, default: 20)

get_label

📖 Read-only

Get a single label from a project. To find resources, use the matching list or search tool. Read-only; missing resources, denied access, and rate limits return errors. project_id/group_id take a numeric ID or URL-encoded path.

Parameters

Parameter Type Required Description
project_id string ✓ Project ID or URL-encoded path
label_id string ✓ The ID or title of a project's label
include_ancestor_groups boolean Include ancestor groups

create_label

✏️ Writes

Create a new label in a project. If the resource already exists, use the update tool. Changes GitLab data; needs permission and returns validation or conflict errors. project_id/group_id take a numeric ID or URL-encoded path.

Parameters

Parameter Type Required Description
project_id string ✓ Project ID or URL-encoded path
name string ✓ The name of the label
color string ✓ The color of the label given in 6-digit hex notation with leading '#' sign
description string The description of the label
priority number | null The priority of the label

update_label

✏️ Writes

Update an existing label in a project. Use the create tool for new resources. Changes GitLab data; needs permission and returns validation or conflict errors. project_id/group_id take a numeric ID or URL-encoded path.

Parameters

Parameter Type Required Description
project_id string ✓ Project ID or URL-encoded path
label_id string ✓ The ID or title of a project's label
new_name string The new name of the label
color string The color of the label given in 6-digit hex notation with leading '#' sign
description string The new description of the label
priority number | null The new priority of the label

delete_label

✏️ Writes

Delete a label from a project. Verify the target first with a get or list tool. Changes or removes GitLab data and may be irreversible; needs permission. project_id/group_id take a numeric ID or URL-encoded path.

Parameters

Parameter Type Required Description
project_id string ✓ Project ID or URL-encoded path
label_id string ✓ The ID or title of a project's label