Skip to main content
Glama

create-sticky-note-item

Add a sticky note to a Miro board by specifying content, position, and optional styling like shape and color.

Instructions

Create a new sticky note item on a Miro board

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
boardIdYesUnique identifier (ID) of the board where the sticky note will be created
dataYesThe content and configuration of the sticky note
positionYesPosition of the sticky note on the board
geometryNoDimensions of the sticky note
styleNoStyle configuration of the sticky note

Implementation Reference

  • The asynchronous handler function that executes the tool logic: validates inputs, constructs the StickyNoteCreateRequest, calls the Miro API to create the sticky note, and returns the result or error.
    fn: async ({ boardId, data, position, geometry, style }) => { try { if (!boardId) { return ServerResponse.error("Board ID is required"); } const createRequest = new StickyNoteCreateRequest(); const stickyNoteData = new StickyNoteData(); stickyNoteData.content = data.content; if (data.shape) { if (!validShapes.includes(data.shape)) { console.warn(`Invalid shape: ${data.shape}. Using default: square`); stickyNoteData.shape = 'square'; } else { stickyNoteData.shape = data.shape; } } else { stickyNoteData.shape = 'square'; } createRequest.data = stickyNoteData; const completePosition = { ...position, origin: position.origin || "center", relativeTo: position.relativeTo || "canvas_center" }; createRequest.position = completePosition; if (geometry) { createRequest.geometry = geometry; } if (style) { const validatedStyle: Record<string, any> = {}; if (style.fillColor) { if (!validColors.includes(style.fillColor)) { console.warn(`Invalid color: ${style.fillColor}. Using default: light_yellow`); validatedStyle.fillColor = 'light_yellow'; } else { validatedStyle.fillColor = style.fillColor; } } else { validatedStyle.fillColor = 'light_yellow'; } if (style.textAlign) { if (!validTextAligns.includes(style.textAlign)) { console.warn(`Invalid text alignment: ${style.textAlign}. Using default: center`); validatedStyle.textAlign = 'center'; } else { validatedStyle.textAlign = style.textAlign; } } else { validatedStyle.textAlign = 'center'; } createRequest.style = validatedStyle; } else { createRequest.style = { fillColor: 'light_yellow', textAlign: 'center' }; } const result = await MiroClient.getApi().createStickyNoteItem(boardId, createRequest); return ServerResponse.text(JSON.stringify(result, null, 2)); } catch (error) { return ServerResponse.error(error); } }
  • Zod-based input schema defining parameters: boardId, data (content, shape), position (x,y,origin,relativeTo), geometry (width,height), style (fillColor,textAlign).
    args: { boardId: z.string().describe("Unique identifier (ID) of the board where the sticky note will be created"), data: z.object({ content: z.string().describe("Text content of the sticky note"), shape: z.string().optional().nullish().describe("Shape of the sticky note (square, rectangle, circle, triangle, rhombus)") }).describe("The content and configuration of the sticky note"), position: z.object({ x: z.number().describe("X coordinate of the sticky note"), y: z.number().describe("Y coordinate of the sticky note"), origin: z.string().optional().nullish().describe("Origin of the sticky note (center, top-left, etc.)"), relativeTo: z.string().optional().nullish().describe("Reference point (canvas_center, etc.)") }).describe("Position of the sticky note on the board"), geometry: z.object({ width: z.number().optional().nullish().describe("Width of the sticky note"), height: z.number().optional().nullish().describe("Height of the sticky note") }).optional().nullish().describe("Dimensions of the sticky note"), style: z.object({ fillColor: z.string().optional().nullish().describe("Fill color of the sticky note (use predefined values like 'light_yellow', 'light_green', etc.)"), textAlign: z.string().optional().nullish().describe("Alignment of the text (left, center, right)") }).optional().nullish().describe("Style configuration of the sticky note") },
  • src/index.ts:134-134 (registration)
    Registers the createStickyNoteItemTool with the ToolBootstrapper instance in the main index file.
    .register(createStickyNoteItemTool)
Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/k-jarzyna/mcp-miro'

If you have feedback or need assistance with the MCP directory API, please join our Discord server