edit_label
Modify label titles and color schemes on project boards to improve visual organization and categorization.
Instructions
Edit a label's title and colors
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| board_id | Yes | Board ID | |
| label_id | Yes | Label ID | |
| title | Yes | Label title/text | |
| bg_color | No | Background color (hex) | |
| color | No | Text color (hex) |
Implementation Reference
- src/tools/labels.ts:57-78 (handler)The asynchronous handler function for the 'edit_label' tool. It destructures the arguments, constructs the label data payload conditionally including bg_color and color if provided, makes a PUT request to the API endpoint `/projects/${board_id}/labels/${label_id}`, and returns a formatted response.async (args) => { const { board_id, label_id, title, bg_color, color } = args; const labelData: any = { label: title, }; if (bg_color) { labelData.bg_color = bg_color; } if (color) { labelData.color = color; } const response = await api.put( `/projects/${board_id}/labels/${label_id}`, labelData ); return formatResponse(response.data); } );
- src/tools/labels.ts:50-56 (schema)The inline Zod input schema defining parameters for the 'edit_label' tool: required board_id, label_id, title; optional bg_color and color.{ board_id: z.number().int().positive().describe("Board ID"), label_id: z.number().int().positive().describe("Label ID"), title: z.string().min(1).describe("Label title/text"), bg_color: z.string().optional().describe("Background color (hex)"), color: z.string().optional().describe("Text color (hex)"), },
- src/tools/labels.ts:47-79 (registration)The direct registration of the 'edit_label' tool using server.tool(), including name, description, input schema, and handler within the registerLabelTools function.server.tool( "edit_label", "Edit a label's title and colors", { board_id: z.number().int().positive().describe("Board ID"), label_id: z.number().int().positive().describe("Label ID"), title: z.string().min(1).describe("Label title/text"), bg_color: z.string().optional().describe("Background color (hex)"), color: z.string().optional().describe("Text color (hex)"), }, async (args) => { const { board_id, label_id, title, bg_color, color } = args; const labelData: any = { label: title, }; if (bg_color) { labelData.bg_color = bg_color; } if (color) { labelData.color = color; } const response = await api.put( `/projects/${board_id}/labels/${label_id}`, labelData ); return formatResponse(response.data); } );
- src/index.ts:25-25 (registration)Top-level registration of all label tools (including 'edit_label') by invoking registerLabelTools(server) in the main MCP server setup.registerLabelTools(server);