create_sticky
Create a sticky note in a FigJam board to add text content at a specified position. Customize with background color and wide format.
Instructions
Create a sticky note in a FigJam board. Sticky notes are the primary way to add text content in FigJam.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| x | Yes | X position on the canvas | |
| y | Yes | Y position on the canvas | |
| text | Yes | Text content of the sticky note | |
| color | No | Background color of the sticky note (default: yellow). Supported values: yellow, pink, green, blue, purple, red, orange, teal, gray, white. | |
| isWide | No | Whether the sticky note should be wide format (default: false) | |
| name | No | Optional name/label for the node | |
| parentId | No | Parent node ID. REQUIRED — server enforces this. Use page node ID for top-level elements. Get page IDs via get_pages tool. |
Implementation Reference
- MCP tool handler for 'create_sticky'. Registers the tool with Zod schema validation for x, y, text, color, isWide, name, and parentId. Sends command to Figma via WebSocket.
server.tool( "create_sticky", "Create a sticky note in a FigJam board. Sticky notes are the primary way to add text content in FigJam.", { x: z.number().describe("X position on the canvas"), y: z.number().describe("Y position on the canvas"), text: z.string().describe("Text content of the sticky note"), color: z .enum([ "yellow", "pink", "green", "blue", "purple", "red", "orange", "teal", "gray", "white", ]) .optional() .describe( "Background color of the sticky note (default: yellow). Supported values: yellow, pink, green, blue, purple, red, orange, teal, gray, white." ), isWide: z .boolean() .optional() .describe("Whether the sticky note should be wide format (default: false)"), name: z.string().optional().describe("Optional name/label for the node"), parentId: z .string() .optional() .describe("Parent node ID. REQUIRED — server enforces this. Use page node ID for top-level elements. Get page IDs via get_pages tool."), }, async ({ x, y, text, color, isWide, name, parentId }) => { try { const result = await sendCommandToFigma("create_sticky", { x, y, text, color: color ?? "yellow", isWide: isWide ?? false, name, parentId, }); return { content: [ { type: "text", text: `Created sticky note: ${JSON.stringify(result)}`, }, ], }; } catch (error) { return { content: [ { type: "text", text: `Error creating sticky note: ${error instanceof Error ? error.message : String(error)}`, }, ], }; } } ); - TypeScript type definition including 'create_sticky' as a valid FigmaCommand in the union type.
| "create_sticky" | "set_sticky_text" | "create_shape_with_text" | "create_connector" | "create_section"; - src/talk_to_figma_mcp/tools/figjam-tools.ts:59-123 (registration)Tool registration via server.tool() call in registerFigJamTools function. The function is called from src/talk_to_figma_mcp/tools/index.ts:27.
server.tool( "create_sticky", "Create a sticky note in a FigJam board. Sticky notes are the primary way to add text content in FigJam.", { x: z.number().describe("X position on the canvas"), y: z.number().describe("Y position on the canvas"), text: z.string().describe("Text content of the sticky note"), color: z .enum([ "yellow", "pink", "green", "blue", "purple", "red", "orange", "teal", "gray", "white", ]) .optional() .describe( "Background color of the sticky note (default: yellow). Supported values: yellow, pink, green, blue, purple, red, orange, teal, gray, white." ), isWide: z .boolean() .optional() .describe("Whether the sticky note should be wide format (default: false)"), name: z.string().optional().describe("Optional name/label for the node"), parentId: z .string() .optional() .describe("Parent node ID. REQUIRED — server enforces this. Use page node ID for top-level elements. Get page IDs via get_pages tool."), }, async ({ x, y, text, color, isWide, name, parentId }) => { try { const result = await sendCommandToFigma("create_sticky", { x, y, text, color: color ?? "yellow", isWide: isWide ?? false, name, parentId, }); return { content: [ { type: "text", text: `Created sticky note: ${JSON.stringify(result)}`, }, ], }; } catch (error) { return { content: [ { type: "text", text: `Error creating sticky note: ${error instanceof Error ? error.message : String(error)}`, }, ], }; } } ); - src/socket.ts:60-61 (helper)Listed in CREATION_COMMANDS set on the server-side socket relay, enforcing that a parentId parameter is required for all creation commands.
"create_section", "create_sticky", "create_shape_with_text", "create_connector", ]);