Skip to main content
Glama

create-card-item

Add a new card to a Miro board with customizable content, position, and styling for organizing tasks and information visually.

Instructions

Create a new card item on a Miro board

Input Schema

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

Implementation Reference

  • The async handler function that executes the logic for creating a card item on a Miro board using the MiroClient API.
    fn: async ({ boardId, data, position, geometry, style }) => { try { if (!boardId) { return ServerResponse.error("Board ID is required"); } const createRequest = new CardCreateRequest(); const cardData = new CardData(); cardData.title = data.title; if (data.description !== undefined) cardData.description = data.description; if (data.assigneeId !== undefined) cardData.assigneeId = data.assigneeId; if (data.dueDate !== undefined) { cardData.dueDate = new Date(data.dueDate); } createRequest.data = cardData; createRequest.position = position; if (geometry) { createRequest.geometry = geometry; } if (style) { createRequest.style = style; } const result = await MiroClient.getApi().createCardItem(boardId, createRequest); return ServerResponse.text(JSON.stringify(result, null, 2)); } catch (error) { return ServerResponse.error(error); } }
  • The ToolSchema definition including the tool name, description, and input schema using Zod for parameter validation.
    const createCardItemTool: ToolSchema = { name: "create-card-item", description: "Create a new card item on a Miro board", args: { boardId: z.string().describe("Unique identifier (ID) of the board where the card will be created"), data: z.object({ title: z.string().describe("Title of the card"), description: z.string().optional().nullish().describe("Description of the card"), assigneeId: z.string().optional().nullish().describe("User ID of the assignee"), dueDate: z.string().optional().nullish().describe("Due date for the card (ISO 8601 format)") }).describe("The content and configuration of the card"), position: z.object({ x: z.number().describe("X coordinate of the card"), y: z.number().describe("Y coordinate of the card") }).describe("Position of the card on the board"), geometry: z.object({ width: z.number().optional().nullish().describe("Width of the card"), height: z.number().optional().nullish().describe("Height of the card"), rotation: z.number().optional().nullish().describe("Rotation angle of the card") }).optional().nullish().describe("Dimensions of the card"), style: z.object({ cardTheme: z.string().optional().nullish().describe("Color of the card") }).optional().nullish().describe("Style configuration of the card") },
  • src/index.ts:125-125 (registration)
    The line where the createCardItemTool is registered with the ToolBootstrapper to make it available as an MCP tool.
    .register(createCardItemTool)
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