update_label
Modify an existing label in the Plane MCP Server by specifying project and label IDs, along with updated label attributes such as name, color, or description.
Instructions
Update an existing label
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| label_data | Yes | The fields to update on the label | |
| label_id | Yes | The uuid identifier of the label to update | |
| project_id | Yes | The uuid identifier of the project containing the label |
Input Schema (JSON Schema)
{
"$schema": "http://json-schema.org/draft-07/schema#",
"additionalProperties": false,
"properties": {
"label_data": {
"additionalProperties": false,
"description": "The fields to update on the label",
"properties": {
"color": {
"maxLength": 255,
"type": "string"
},
"created_at": {
"format": "date-time",
"type": "string"
},
"created_by": {
"format": "uuid",
"type": "string"
},
"deleted_at": {
"format": "date-time",
"type": "string"
},
"description": {
"type": "string"
},
"external_id": {
"maxLength": 255,
"type": "string"
},
"external_source": {
"maxLength": 255,
"type": "string"
},
"id": {
"format": "uuid",
"type": "string"
},
"name": {
"maxLength": 255,
"type": "string"
},
"parent": {
"format": "uuid",
"type": "string"
},
"project": {
"format": "uuid",
"type": "string"
},
"sort_order": {
"type": "number"
},
"updated_at": {
"format": "date-time",
"type": "string"
},
"updated_by": {
"format": "uuid",
"type": "string"
},
"workspace": {
"format": "uuid",
"type": "string"
}
},
"type": "object"
},
"label_id": {
"description": "The uuid identifier of the label to update",
"type": "string"
},
"project_id": {
"description": "The uuid identifier of the project containing the label",
"type": "string"
}
},
"required": [
"project_id",
"label_id",
"label_data"
],
"type": "object"
}
Implementation Reference
- src/tools/metadata.ts:329-343 (handler)Handler function that executes the PATCH request to update a label via Plane API.async ({ project_id, label_id, label_data }) => { const response = await makePlaneRequest( "PATCH", `workspaces/${process.env.PLANE_WORKSPACE_SLUG}/projects/${project_id}/labels/${label_id}/`, label_data ); return { content: [ { type: "text", text: JSON.stringify(response, null, 2), }, ], }; }
- src/tools/metadata.ts:324-328 (schema)Input schema definition for the update_label tool parameters.{ project_id: z.string().describe("The uuid identifier of the project containing the label"), label_id: z.string().describe("The uuid identifier of the label to update"), label_data: LabelSchema.partial().describe("The fields to update on the label"), },
- src/tools/metadata.ts:321-344 (registration)Registration of the update_label tool using server.tool() in registerMetadataTools.server.tool( "update_label", "Update an existing label", { project_id: z.string().describe("The uuid identifier of the project containing the label"), label_id: z.string().describe("The uuid identifier of the label to update"), label_data: LabelSchema.partial().describe("The fields to update on the label"), }, async ({ project_id, label_id, label_data }) => { const response = await makePlaneRequest( "PATCH", `workspaces/${process.env.PLANE_WORKSPACE_SLUG}/projects/${project_id}/labels/${label_id}/`, label_data ); return { content: [ { type: "text", text: JSON.stringify(response, null, 2), }, ], }; } );
- src/schemas.ts:106-122 (schema)Zod schema for Label object, used as base for label_data in update_label tool.export const Label = z.object({ color: z.string().max(255).optional(), created_at: z.string().datetime({ offset: true }).readonly(), created_by: z.string().uuid().readonly(), deleted_at: z.string().datetime({ offset: true }).readonly(), description: z.string().optional(), external_id: z.string().max(255).optional(), external_source: z.string().max(255).optional(), id: z.string().uuid().readonly(), name: z.string().max(255), parent: z.string().uuid().optional(), project: z.string().uuid().readonly(), sort_order: z.number().optional(), updated_at: z.string().datetime({ offset: true }).readonly(), updated_by: z.string().uuid().readonly(), workspace: z.string().uuid().readonly(), });