update-card-item
Modify an existing card on a Miro board by updating its title, description, assignee, due date, position, size, rotation, or style using board and item IDs.
Instructions
Update an existing card item on a Miro board
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| boardId | Yes | Unique identifier (ID) of the board that contains the card | |
| data | No | The updated content and configuration of the card | |
| geometry | No | Updated dimensions of the card | |
| itemId | Yes | Unique identifier (ID) of the card that you want to update | |
| position | No | Updated position of the card on the board | |
| style | No | Updated style configuration of the card |
Implementation Reference
- src/tools/updateCardItem.ts:34-78 (handler)The main handler function for the 'update-card-item' tool. It validates inputs, constructs a CardUpdateRequest object, calls MiroClient.getApi().updateCardItem to perform the update, and returns the result or error.fn: async ({ boardId, itemId, data, position, geometry, style }) => { try { if (!boardId) { return ServerResponse.error("Board ID is required"); } if (!itemId) { return ServerResponse.error("Item ID is required"); } const updateData = new CardUpdateRequest(); if (data) { const cardData = new CardData(); if (data.title !== undefined) 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); } updateData.data = cardData; } if (position) { updateData.position = position; } if (geometry) { updateData.geometry = geometry; } if (style) { updateData.style = style; } const result = await MiroClient.getApi().updateCardItem(boardId, itemId, updateData); return ServerResponse.text(JSON.stringify(result, null, 2)); } catch (error) { return ServerResponse.error(error); } }
- src/tools/updateCardItem.ts:9-33 (schema)The ToolSchema definition including name, description, and Zod input schema for parameters like boardId, itemId, data, position, geometry, and style.const updateCardItemTool: ToolSchema = { name: "update-card-item", description: "Update an existing card item on a Miro board", args: { boardId: z.string().describe("Unique identifier (ID) of the board that contains the card"), itemId: z.string().describe("Unique identifier (ID) of the card that you want to update"), data: z.object({ title: z.string().optional().nullish().describe("Updated title of the card"), description: z.string().optional().nullish().describe("Updated description of the card"), assigneeId: z.string().optional().nullish().describe("Updated user ID of the assignee"), dueDate: z.string().optional().nullish().describe("Updated due date for the card (ISO 8601 format)") }).optional().nullish().describe("The updated content and configuration of the card"), position: z.object({ x: z.number().describe("Updated X coordinate of the card"), y: z.number().describe("Updated Y coordinate of the card") }).optional().nullish().describe("Updated position of the card on the board"), geometry: z.object({ width: z.number().optional().nullish().describe("Updated width of the card"), height: z.number().optional().nullish().describe("Updated height of the card"), rotation: z.number().optional().nullish().describe("Updated rotation angle of the card") }).optional().nullish().describe("Updated dimensions of the card"), style: z.object({ cardTheme: z.string().optional().nullish().describe("Updated color of the card") }).optional().nullish().describe("Updated style configuration of the card") },
- src/index.ts:127-127 (registration)Registration of the updateCardItemTool in the ToolBootstrapper chain in the main index file..register(updateCardItemTool)