Skip to main content
Glama

create-embed-item

Add web content to Miro boards by embedding URLs at specific positions with custom dimensions.

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
positionYesPosition of the embed on the board
geometryYesDimensions of the embed

Implementation Reference

  • The main execution logic for the 'create-embed-item' tool: constructs EmbedCreateRequest from inputs and calls Miro API to create embed item on board.
    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 input schema defining parameters for boardId, data (url & 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 ToolBootstrapper instance.
    .register(createEmbedItemTool)
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