create-tag
Add custom tags to Miro boards to organize and categorize content. Specify board ID, tag title, and optional color for visual grouping.
Instructions
Create a new tag on a Miro board
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| boardId | Yes | Unique identifier (ID) of the board where the tag will be created | |
| data | Yes | The content and configuration of the tag | |
| fillColor | No | Fill color of the tag (hex format, e.g. #000000) |
Implementation Reference
- src/tools/createTag.ts:18-36 (handler)The handler function that implements the core logic of the 'create-tag' tool, validating inputs, constructing a TagCreateRequest, and calling the Miro API to create a tag on the board.fn: async ({ boardId, data, fillColor }) => { try { if (!boardId) { return ServerResponse.error("Board ID is required"); } const createRequest = new TagCreateRequest(); createRequest.title = data.title; if (fillColor) { createRequest.fillColor = fillColor; } const result = await MiroClient.getApi().createTag(boardId, createRequest); return ServerResponse.text(JSON.stringify(result, null, 2)); } catch (error) { return ServerResponse.error(error); } }
- src/tools/createTag.ts:11-17 (schema)Zod-based input schema defining the parameters for the 'create-tag' tool: required boardId and data.title, optional fillColor.args: { boardId: z.string().describe("Unique identifier (ID) of the board where the tag will be created"), data: z.object({ title: z.string().describe("Title of the tag") }).describe("The content and configuration of the tag"), fillColor: z.string().optional().nullish().describe("Fill color of the tag (hex format, e.g. #000000)") },
- src/index.ts:165-165 (registration)Registers the createTagTool with the ToolBootstrapper instance in the main index file..register(createTagTool)