create-tag
Add custom tags to a Miro board by specifying a title and optional fill color. Input includes the board ID and content configuration for streamlined organization.
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 executes the 'create-tag' tool logic: validates inputs, creates a TagCreateRequest, calls Miro API to create the tag, and returns the result or error.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:8-17 (schema)The ToolSchema definition including name, description, and Zod-based input schema for the 'create-tag' tool.const createTagTool: ToolSchema = { name: "create-tag", description: "Create a new tag on a Miro board", 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)Registration of the 'create-tag' tool (imported as createTagTool) with the ToolBootstrapper..register(createTagTool)