Skip to main content
Glama

create-frame

Generate and position custom frames on Miro boards, specifying dimensions, style, and content visibility for enhanced collaboration.

Instructions

Create a new frame on a Miro board

Input Schema

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

Implementation Reference

  • The asynchronous handler function that executes the 'create-frame' tool. It validates the boardId, constructs FrameCreateRequest and FrameChanges objects from input parameters, and calls the Miro API to create the frame item.
    fn: async ({ boardId, data, position, geometry, style }: { boardId: string, data: { title?: string, format?: string, type?: string, showContent?: boolean }, position: { x: number, y: number }, geometry?: { width?: number, height?: number }, style?: { fillColor?: string } }) => { try { if (!boardId) { return ServerResponse.error("Board ID is required"); } const createRequest = new FrameCreateRequest(); const frameData = new FrameChanges(); if (data.title !== undefined) frameData.title = data.title; if (data.format !== undefined) frameData.format = data.format; if (data.type !== undefined) frameData.type = data.type; if (data.showContent !== undefined) frameData.showContent = data.showContent; createRequest.data = frameData; createRequest.position = position; if (geometry) { createRequest.geometry = geometry; } if (style) { createRequest.style = style; } const result = await MiroClient.getApi().createFrameItem(boardId, createRequest); return ServerResponse.text(JSON.stringify(result, null, 2)); } catch (error) { return ServerResponse.error(error); } }
  • Defines the ToolSchema for 'create-frame', including name, description, and Zod-based input argument schemas for boardId, data, position, geometry, and style.
    const createFrameItemTool: ToolSchema = { name: "create-frame", description: "Create a new frame on a Miro board", args: { boardId: z.string().describe("Unique identifier (ID) of the board where the frame will be created"), data: z.object({ title: z.string().optional().nullish().describe("Title of the frame. This title appears at the top of the frame."), format: z.string().optional().nullish().describe("Format of the frame. Only 'custom' is supported currently."), type: z.string().optional().nullish().describe("Type of the frame. Only 'freeform' is supported currently."), showContent: z.boolean().optional().nullish().describe("Hide or reveal the content inside a frame (Enterprise plan only).") }).describe("The content and configuration of the frame"), position: z.object({ x: z.number().describe("X coordinate of the frame"), y: z.number().describe("Y coordinate of the frame") }).describe("Position of the frame on the board"), geometry: z.object({ width: z.number().optional().nullish().describe("Width of the frame"), height: z.number().optional().nullish().describe("Height of the frame") }).optional().nullish().describe("Dimensions of the frame"), style: z.object({ fillColor: z.string().optional().nullish().describe("Fill color for the frame. Hex values like #f5f6f8, #d5f692, etc.") }).optional().nullish().describe("Style configuration of the frame") },
  • src/index.ts:138-138 (registration)
    Registers the createFrameItemTool with the ToolBootstrapper instance in the main server setup.
    .register(createFrameItemTool)

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