Skip to main content
Glama

create-embed-item

Add an embed item to a Miro board by specifying the URL, position, dimensions, and mode. Use this tool to integrate external content directly onto the canvas for collaborative workflows.

Instructions

Create a new embed item on a Miro board

Input Schema

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

Implementation Reference

  • The main handler function that executes the tool: validates boardId, constructs EmbedCreateRequest and EmbedUrlData from inputs, calls MiroClient API to create the embed item, and returns the result or error.
    fn: async ({ boardId, data, position, geometry }) => { try { if (!boardId) { return ServerResponse.error("Board ID is required"); } const createRequest = new EmbedCreateRequest(); const embedData = new EmbedUrlData(); embedData.url = data.url; if (data.mode !== undefined) { embedData.mode = data.mode; } createRequest.data = embedData; const completePosition = { ...position, origin: position.origin || "center", relativeTo: position.relativeTo || "canvas_center" }; createRequest.position = completePosition; createRequest.geometry = geometry; const result = await MiroClient.getApi().createEmbedItem(boardId, createRequest); return ServerResponse.text(JSON.stringify(result, null, 2)); } catch (error) { return ServerResponse.error(error); } }
  • Zod-based input schema defining parameters for the create-embed-item tool: boardId, data (url and mode), position (x, y, origin, relativeTo), and geometry (width or height with validation rules).
    args: { boardId: z.string().describe("Unique identifier (ID) of the board where the embed will be created"), data: z.object({ url: z.string().describe("URL to be embedded on the board"), mode: z.string().optional().nullish().describe("Mode of the embed (normal, inline, etc.)") }).describe("The content and configuration of the embed"), position: z.object({ x: z.number().describe("X coordinate of the embed"), y: z.number().describe("Y coordinate of the embed"), origin: z.string().optional().nullish().describe("Origin of the embed (center, top-left, etc.)"), relativeTo: z.string().optional().nullish().describe("Reference point (canvas_center, etc.)") }).describe("Position of the embed on the board"), geometry: z.object({ width: z.number().optional().nullish().describe("Width of the embed"), height: z.number().optional().nullish().describe("Height of the embed") }) .refine(data => data.width !== undefined || data.height !== undefined, { message: "Either width or height must be provided" }) .refine(data => !(data.width !== undefined && data.height !== undefined), { message: "Only one of width or height should be provided for items with fixed aspect ratio" }) .describe("Dimensions of the embed") },
  • src/index.ts:161-161 (registration)
    Registers the createEmbedItemTool with the MCP ToolBootstrapper in the main server index file.
    .register(createEmbedItemTool)

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