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
| 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 |
Input Schema (JSON Schema)
{
"$schema": "http://json-schema.org/draft-07/schema#",
"additionalProperties": false,
"properties": {
"boardId": {
"description": "Unique identifier (ID) of the board that contains the card",
"type": "string"
},
"data": {
"additionalProperties": false,
"description": "The updated content and configuration of the card",
"properties": {
"assigneeId": {
"description": "Updated user ID of the assignee",
"type": "string"
},
"description": {
"description": "Updated description of the card",
"type": "string"
},
"dueDate": {
"description": "Updated due date for the card (ISO 8601 format)",
"type": "string"
},
"title": {
"description": "Updated title of the card",
"type": "string"
}
},
"type": "object"
},
"geometry": {
"additionalProperties": false,
"description": "Updated dimensions of the card",
"properties": {
"height": {
"description": "Updated height of the card",
"type": "number"
},
"rotation": {
"description": "Updated rotation angle of the card",
"type": "number"
},
"width": {
"description": "Updated width of the card",
"type": "number"
}
},
"type": "object"
},
"itemId": {
"description": "Unique identifier (ID) of the card that you want to update",
"type": "string"
},
"position": {
"additionalProperties": false,
"description": "Updated position of the card on the board",
"properties": {
"x": {
"description": "Updated X coordinate of the card",
"type": "number"
},
"y": {
"description": "Updated Y coordinate of the card",
"type": "number"
}
},
"required": [
"x",
"y"
],
"type": "object"
},
"style": {
"additionalProperties": false,
"description": "Updated style configuration of the card",
"properties": {
"cardTheme": {
"description": "Updated color of the card",
"type": "string"
}
},
"type": "object"
}
},
"required": [
"boardId",
"itemId"
],
"type": "object"
}
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)