create-mindmap-node
Add a new mind map node to a Miro board by specifying content, position, and optional styling like colors or parent-child relationships.
Instructions
Create a new mind map node on a Miro board
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| boardId | Yes | Unique identifier (ID) of the board where you want to create the node | |
| data | Yes | The content and style configuration of the mind map node | |
| position | Yes | Position of the node on the board |
Implementation Reference
- src/tools/createMindmapNode.ts:24-49 (handler)The async function that handles the execution of the create-mindmap-node tool, preparing the request data and calling the Miro API's createMindmapNodesExperimental method.fn: async ({ boardId, data, position }) => { try { // Prepare the request data const mindmapCreateRequest = { data: { nodeView: { data: { type: "text", content: data.content } }, ...(data.parentId && { parentId: data.parentId }), ...(data.style && { style: data.style }) }, position }; // Call the Miro API to create a mind map node const response = await MiroClient.getApi().createMindmapNodesExperimental(boardId, mindmapCreateRequest); return ServerResponse.text(JSON.stringify(response.body, null, 2)); } catch (error) { process.stderr.write(`Error creating Miro mind map node: ${error}\n`); return ServerResponse.error(error); } }
- src/tools/createMindmapNode.ts:9-23 (schema)Zod schema defining the input arguments for the tool: boardId (string), data (object with content, optional parentId and style), position (object with x and y coordinates).args: { boardId: z.string().describe("Unique identifier (ID) of the board where you want to create the node"), data: z.object({ content: z.string().describe("Text content for the mind map node"), parentId: z.string().optional().nullish().describe("ID of the parent node (if this is a child node)"), style: z.object({ fillColor: z.string().optional().nullish().describe("Fill color for the node"), textColor: z.string().optional().nullish().describe("Text color for the node") }).optional().nullish() }).describe("The content and style configuration of the mind map node"), position: z.object({ x: z.number().describe("X coordinate of the node"), y: z.number().describe("Y coordinate of the node") }).describe("Position of the node on the board") },
- src/index.ts:186-186 (registration)The registration of the createMindmapNodeTool in the ToolBootstrapper instance, adding it to the MCP server..register(createMindmapNodeTool)