Skip to main content
Glama

create-sticky-note-item

Add a sticky note to a Miro board by specifying content, position, shape, size, and style. Ideal for organizing ideas or tasks visually with customizable layout and design options.

Instructions

Create a new sticky note item on a Miro board

Input Schema

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

Input Schema (JSON Schema)

{ "$schema": "http://json-schema.org/draft-07/schema#", "additionalProperties": false, "properties": { "boardId": { "description": "Unique identifier (ID) of the board where the sticky note will be created", "type": "string" }, "data": { "additionalProperties": false, "description": "The content and configuration of the sticky note", "properties": { "content": { "description": "Text content of the sticky note", "type": "string" }, "shape": { "description": "Shape of the sticky note (square, rectangle, circle, triangle, rhombus)", "type": "string" } }, "required": [ "content" ], "type": "object" }, "geometry": { "additionalProperties": false, "description": "Dimensions of the sticky note", "properties": { "height": { "description": "Height of the sticky note", "type": "number" }, "width": { "description": "Width of the sticky note", "type": "number" } }, "type": "object" }, "position": { "additionalProperties": false, "description": "Position of the sticky note on the board", "properties": { "origin": { "description": "Origin of the sticky note (center, top-left, etc.)", "type": "string" }, "relativeTo": { "description": "Reference point (canvas_center, etc.)", "type": "string" }, "x": { "description": "X coordinate of the sticky note", "type": "number" }, "y": { "description": "Y coordinate of the sticky note", "type": "number" } }, "required": [ "x", "y" ], "type": "object" }, "style": { "additionalProperties": false, "description": "Style configuration of the sticky note", "properties": { "fillColor": { "description": "Fill color of the sticky note (use predefined values like 'light_yellow', 'light_green', etc.)", "type": "string" }, "textAlign": { "description": "Alignment of the text (left, center, right)", "type": "string" } }, "type": "object" } }, "required": [ "boardId", "data", "position" ], "type": "object" }

Implementation Reference

  • The handler function that executes the tool's logic: validates inputs, constructs StickyNoteCreateRequest and StickyNoteData objects, handles defaults and validations for shape, color, textAlign, and calls Miro API to create the sticky note item.
    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 schema defining the input parameters for the tool: 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)
  • src/index.ts:33-33 (registration)
    Imports the createStickyNoteItemTool for registration.
    import createStickyNoteItemTool from './tools/createStickyNoteItem.js';

Other Tools

Related 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