add_label
Add a label to a task in FluentBoards project management to organize and categorize work items by specifying board, task, and label IDs.
Instructions
Add a label to a task
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| board_id | Yes | Board ID | |
| task_id | Yes | Task ID | |
| label_id | Yes | Label ID |
Implementation Reference
- src/tools/labels.ts:16-24 (handler)The handler function for the 'add_label' tool. It destructures the arguments, makes a POST request to the API endpoint `/projects/{board_id}/labels/task` with taskId and labelId, and returns a formatted response.async (args) => { const { board_id, task_id, label_id } = args; const response = await api.post( `/projects/${board_id}/labels/task`, { taskId: task_id, labelId: label_id } ); return formatResponse(response.data); }
- src/tools/labels.ts:11-15 (schema)Zod schema defining the input parameters for the 'add_label' tool: board_id, task_id, and label_id, all positive integers.{ board_id: z.number().int().positive().describe("Board ID"), task_id: z.number().int().positive().describe("Task ID"), label_id: z.number().int().positive().describe("Label ID"), },
- src/tools/labels.ts:9-25 (registration)Registration of the 'add_label' tool using server.tool(), including description, input schema, and handler function within the registerLabelTools function."add_label", "Add a label to a task", { board_id: z.number().int().positive().describe("Board ID"), task_id: z.number().int().positive().describe("Task ID"), label_id: z.number().int().positive().describe("Label ID"), }, async (args) => { const { board_id, task_id, label_id } = args; const response = await api.post( `/projects/${board_id}/labels/task`, { taskId: task_id, labelId: label_id } ); return formatResponse(response.data); } );
- src/index.ts:25-25 (registration)Top-level call to registerLabelTools on the main MCP server instance, which registers the 'add_label' tool among others.registerLabelTools(server);