create_label
Add a new label to a FluentBoards project board by specifying title, background color, and text color for task organization.
Instructions
Create a new label on a board
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| board_id | Yes | Board ID | |
| title | Yes | Label title/text | |
| bg_color | Yes | Background color (hex) - e.g., #4bce97 | |
| color | No | Text color (hex) - defaults to #1B2533 | #1B2533 |
Implementation Reference
- src/tools/labels.ts:93-107 (handler)Handler function that destructures arguments, prepares label data, posts to the API endpoint `/projects/${board_id}/labels`, and formats the response.async (args) => { const { board_id, title, bg_color, color } = args; const labelData: any = { label: title, bg_color, color, }; const response = await api.post( `/projects/${board_id}/labels`, labelData ); return formatResponse(response.data); }
- src/tools/labels.ts:81-108 (registration)Registers the 'create_label' tool with the MCP server, including description, input schema using Zod, and the handler function.server.tool( "create_label", "Create a new label on a board", { board_id: z.number().int().positive().describe("Board ID"), title: z.string().min(1).describe("Label title/text"), bg_color: z.string().describe("Background color (hex) - e.g., #4bce97"), color: z .string() .default("#1B2533") .describe("Text color (hex) - defaults to #1B2533"), }, async (args) => { const { board_id, title, bg_color, color } = args; const labelData: any = { label: title, bg_color, color, }; const response = await api.post( `/projects/${board_id}/labels`, labelData ); return formatResponse(response.data); } );
- src/types/index.ts:47-52 (schema)Zod schema defining the input structure for creating a label, matching the tool's input parameters.export const CreateLabelSchema = z.object({ board_id: z.number().int().positive(), title: z.string().min(1), bg_color: z.string(), color: z.string().default("#1B2533"), });
- src/index.ts:25-25 (registration)Calls registerLabelTools on the MCP server, which includes registration of the create_label tool among others.registerLabelTools(server);