update-app-card-item
Modify app card items on a Miro board by updating title, description, status, fields, position, or dimensions. Requires board ID and item ID for targeted changes.
Instructions
Update an existing app card item on a Miro board
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| boardId | Yes | Unique identifier (ID) of the board that contains the app card | |
| data | No | The updated content and configuration of the app card | |
| geometry | No | Updated dimensions of the app card | |
| itemId | Yes | Unique identifier (ID) of the app card that you want to update | |
| position | No | Updated position of the app card on the board |
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 app card",
"type": "string"
},
"data": {
"additionalProperties": false,
"description": "The updated content and configuration of the app card",
"properties": {
"description": {
"description": "Updated description of the app card",
"type": "string"
},
"fields": {
"description": "Updated custom fields to display on the app card",
"items": {
"additionalProperties": false,
"properties": {
"fillColor": {
"description": "Fill color of the field",
"type": "string"
},
"iconShape": {
"description": "Shape of the icon",
"type": "string"
},
"textColor": {
"description": "Color of the text",
"type": "string"
},
"value": {
"description": "Value of the field",
"type": "string"
}
},
"required": [
"value"
],
"type": "object"
},
"type": "array"
},
"status": {
"description": "Updated status text of the app card",
"type": "string"
},
"title": {
"description": "Updated title of the app card",
"type": "string"
}
},
"type": "object"
},
"geometry": {
"additionalProperties": false,
"description": "Updated dimensions of the app card",
"properties": {
"height": {
"description": "Updated height of the app card",
"type": "number"
},
"width": {
"description": "Updated width of the app card",
"type": "number"
}
},
"type": "object"
},
"itemId": {
"description": "Unique identifier (ID) of the app card that you want to update",
"type": "string"
},
"position": {
"additionalProperties": false,
"description": "Updated position of the app card on the board",
"properties": {
"x": {
"description": "Updated X coordinate of the app card",
"type": "number"
},
"y": {
"description": "Updated Y coordinate of the app card",
"type": "number"
}
},
"required": [
"x",
"y"
],
"type": "object"
}
},
"required": [
"boardId",
"itemId"
],
"type": "object"
}
Implementation Reference
- src/tools/updateAppCardItem.ts:36-83 (handler)The main handler function for the 'update-app-card-item' tool. It validates inputs, constructs an AppCardUpdateRequest using Miro API models, calls the MiroClient API to update the app card, and returns the result or error.fn: async ({ boardId, itemId, data, position, geometry }) => { try { if (!boardId) { return ServerResponse.error("Board ID is required"); } if (!itemId) { return ServerResponse.error("Item ID is required"); } const updateRequest = new AppCardUpdateRequest(); if (data) { const appCardData = new AppCardDataChanges(); if (data.title !== undefined) appCardData.title = data.title; if (data.description !== undefined) appCardData.description = data.description; if (data.status !== undefined) appCardData.status = data.status; if (data.fields) { appCardData.fields = data.fields.map(field => { const customField = new CustomField(); customField.value = field.value; if (field.iconShape) customField.iconShape = field.iconShape; if (field.fillColor) customField.fillColor = field.fillColor; if (field.textColor) customField.textColor = field.textColor; return customField; }); } updateRequest.data = appCardData; } if (position) { updateRequest.position = position; } if (geometry) { updateRequest.geometry = geometry; } const result = await MiroClient.getApi().updateAppCardItem(boardId, itemId, updateRequest); return ServerResponse.text(JSON.stringify(result, null, 2)); } catch (error) { return ServerResponse.error(error); } }
- src/tools/updateAppCardItem.ts:11-35 (schema)The tool schema definition including name, description, and Zod input schema for parameters: boardId, itemId, data, position, geometry.name: "update-app-card-item", description: "Update an existing app card item on a Miro board", args: { boardId: z.string().describe("Unique identifier (ID) of the board that contains the app card"), itemId: z.string().describe("Unique identifier (ID) of the app card that you want to update"), data: z.object({ title: z.string().optional().nullish().describe("Updated title of the app card"), description: z.string().optional().nullish().describe("Updated description of the app card"), status: z.string().optional().nullish().describe("Updated status text of the app card"), fields: z.array(z.object({ value: z.string().describe("Value of the field"), iconShape: z.string().optional().nullish().describe("Shape of the icon"), fillColor: z.string().optional().nullish().describe("Fill color of the field"), textColor: z.string().optional().nullish().describe("Color of the text"), })).optional().nullish().describe("Updated custom fields to display on the app card") }).optional().nullish().describe("The updated content and configuration of the app card"), position: z.object({ x: z.number().describe("Updated X coordinate of the app card"), y: z.number().describe("Updated Y coordinate of the app card") }).optional().nullish().describe("Updated position of the app card on the board"), geometry: z.object({ width: z.number().optional().nullish().describe("Updated width of the app card"), height: z.number().optional().nullish().describe("Updated height of the app card") }).optional().nullish().describe("Updated dimensions of the app card") },
- src/index.ts:123-123 (registration)Registers the updateAppCardItemTool with the ToolBootstrapper instance..register(updateAppCardItemTool)