Skip to content

Label Tools

Five tools for managing labels: get (list a project's labels), create, update, delete, and sync-issue-labels (set the labels on a single issue).

Labels are project-scoped tags you attach to issues to categorise them. To see which labels an issue carries, read prepare-issue-context (full {id, name, color} objects) or search-issues / get-my-issues (compact label_ids). To resolve a label_id to its name and colour, use get-labels or prepare-project-context.

Permission Model

  • Getting labels: requires Labels: Read permission
  • Creating labels: requires Labels: Create permission
  • Updating labels: requires Labels: Update permission
  • Deleting labels: requires Labels: Delete permission
  • Setting an issue's labels (sync-issue-labels): requires Issues: Update permission — attaching labels is an edit to the issue, not a label mutation
  • Project owners and admins bypass all permission checks

Enums

Colors

ValueColor
0Grey
1Green
2Blue
3Red
4Purple
5Yellow
6Orange
7Teal
8Pink
9Indigo

get-labels

List a project's labels with id, name, color, and display order. Read-only and safe to call repeatedly.

Parameters

ParameterTypeRequiredDescription
project_idintegerYesThe project to get labels for

Behavior

  • Returns labels ordered by their display order
  • Each label includes id, name, color (09), and order
  • Use label.id as label_ids when filtering search-issues or attaching labels via create-issue / sync-issue-labels
  • Marked as #[IsReadOnly] and #[IsIdempotent]

Example Prompt

What labels does the kendo project have?

create-label

Create a new label in a project.

Parameters

ParameterTypeRequiredDescription
project_idintegerYesThe project to create the label in
namestringYesLabel name (max 255 characters, unique within the project)
colorintegerYesColor code (09, see table above)
orderintegerNoDisplay order (default 0, minimum 0)

Behavior

  • Label names must be unique within the project — a duplicate name is rejected with a clear message
  • Requires Labels: Create permission

Example Prompt

Add a red label called "Urgent" to the kendo project

update-label

Rename or recolor an existing label.

Parameters

ParameterTypeRequiredDescription
label_idintegerYesThe label to update
namestringNoNew name (omit to keep current; must stay unique in the project)
colorintegerNoNew color code (09, omit to keep current)

Behavior

  • Only provided fields change; omit name or color to keep the current value
  • A renamed label must stay unique within its project
  • Requires Labels: Update permission

Example Prompt

Rename the "Urgent" label to "Critical" and make it purple

delete-label

Permanently delete a label.

Destructive

This action cannot be undone. The label is detached from any issues that carry it first, then removed. The issues themselves are kept — only the label association is dropped.

Parameters

ParameterTypeRequiredDescription
label_idintegerYesThe label to delete

Behavior

  • Issues that carried the label are preserved — only the association is removed
  • Requires Labels: Delete permission

Example Prompt

Delete the "Deprecated" label from the kendo project

sync-issue-labels

Set, replace, or clear the labels on an existing issue. Pass the complete list of label IDs the issue should carry — this replaces the current set exactly.

Parameters

ParameterTypeRequiredDescription
issue_idintegerNo*The numeric ID of the issue
issue_keystringNo*The issue key, e.g. KD-0042
label_idsarrayYesComplete list of label IDs the issue should carry. Replaces the current set. Pass [] to clear all labels.

* Provide exactly one of issue_id or issue_key.

Behavior

  • Replaces the issue's label set exactly with label_ids — labels not listed are detached
  • Pass [] to remove all labels from the issue
  • All label IDs must belong to the issue's project; a cross-project or unknown id is rejected with the same error (no existence leak)
  • Requires Issues: Update permission (attaching labels is an edit to the issue)
  • The response returns the issue's resulting labels as {id, name, color} objects

Example Prompt

Set the labels on KD-0042 to "Backend" and "Urgent"

See Also

  • Issuescreate-issue accepts label_ids; search-issues filters by label_ids
  • Resources — Read project and issue data, including labels
  • Projects Guide — Understanding labels and the board