Skip to main content
Glama

create-card-item

Add a new card to a Miro board with customizable title, description, assignee, due date, position, dimensions, and style using the MCP server.

Instructions

Create a new card item on a Miro board

Input Schema

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

Input Schema (JSON Schema)

{ "$schema": "http://json-schema.org/draft-07/schema#", "additionalProperties": false, "properties": { "boardId": { "description": "Unique identifier (ID) of the board where the card will be created", "type": "string" }, "data": { "additionalProperties": false, "description": "The content and configuration of the card", "properties": { "assigneeId": { "description": "User ID of the assignee", "type": "string" }, "description": { "description": "Description of the card", "type": "string" }, "dueDate": { "description": "Due date for the card (ISO 8601 format)", "type": "string" }, "title": { "description": "Title of the card", "type": "string" } }, "required": [ "title" ], "type": "object" }, "geometry": { "additionalProperties": false, "description": "Dimensions of the card", "properties": { "height": { "description": "Height of the card", "type": "number" }, "rotation": { "description": "Rotation angle of the card", "type": "number" }, "width": { "description": "Width of the card", "type": "number" } }, "type": "object" }, "position": { "additionalProperties": false, "description": "Position of the card on the board", "properties": { "x": { "description": "X coordinate of the card", "type": "number" }, "y": { "description": "Y coordinate of the card", "type": "number" } }, "required": [ "x", "y" ], "type": "object" }, "style": { "additionalProperties": false, "description": "Style configuration of the card", "properties": { "cardTheme": { "description": "Color of the card", "type": "string" } }, "type": "object" } }, "required": [ "boardId", "data", "position" ], "type": "object" }

Implementation Reference

  • The handler function that implements the core logic of the 'create-card-item' tool. It validates inputs, constructs a CardCreateRequest object, and uses MiroClient to create a card item on the board.
    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); } }
  • Zod-based input schema defining the parameters for the 'create-card-item' tool, including boardId, data, position, geometry, and style.
    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 registration of the create-card-item tool in the main ToolBootstrapper chain in src/index.ts.
    .register(createCardItemTool)
  • src/index.ts:24-24 (registration)
    The import statement for the createCardItemTool in the main index file.
    import createCardItemTool from './tools/createCardItem.js';

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