update_card
Modify existing Trello card details including name, description, due date, status, position, or archive status to keep project tasks current and organized.
Instructions
Update properties of an existing Trello card. Use this to change card details like name, description, due date, or status.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| apiKey | Yes | Trello API key (automatically provided by Claude.app from your stored credentials) | |
| token | Yes | Trello API token (automatically provided by Claude.app from your stored credentials) | |
| cardId | Yes | ID of the card to update (you can get this from board details or card searches) | |
| name | No | New name/title for the card | |
| desc | No | New description for the card | |
| closed | No | Set to true to archive the card, false to unarchive | |
| due | No | Set due date (ISO 8601 format) or null to remove due date | |
| dueComplete | No | Mark the due date as complete (true) or incomplete (false) | |
| idList | No | Move card to a different list by providing the list ID | |
| pos | No | Change position in the list: "top", "bottom", or specific number |
Implementation Reference
- src/tools/cards.ts:191-214 (handler)The handler function for updating a Trello card, which validates inputs and calls the Trello client.
export async function handleUpdateCard(args: unknown) { try { const updateData = validateUpdateCard(args); const { apiKey, token, cardId, ...updates } = updateData; const client = new TrelloClient({ apiKey, token }); const response = await client.updateCard(cardId, updates); const card = response.data; const result = { summary: `Updated card: ${card.name}`, card: { id: card.id, name: card.name, description: card.desc || 'No description', url: card.shortUrl, listId: card.idList, boardId: card.idBoard, position: card.pos, due: card.due, dueComplete: card.dueComplete, closed: card.closed, labels: card.labels?.map(label => ({ id: label.id, - src/utils/validation.ts:43-56 (schema)Schema definition for validating the update_card input arguments.
export const updateCardSchema = z.object({ apiKey: z.string().min(1, 'API key is required'), token: z.string().min(1, 'Token is required'), cardId: trelloIdSchema, name: z.string().min(1).max(16384).optional(), desc: z.string().max(16384).optional(), closed: z.boolean().optional(), due: z.string().datetime().nullable().optional(), dueComplete: z.boolean().optional(), idList: trelloIdOptionalSchema, pos: z.union([z.number().min(0), z.enum(['top', 'bottom'])]).optional(), idMembers: z.array(trelloIdSchema).optional(), idLabels: z.array(trelloIdSchema).optional() }); - src/tools/cards.ts:134-189 (registration)Definition and registration of the update_card tool.
export const updateCardTool: Tool = { name: 'update_card', description: 'Update properties of an existing Trello card. Use this to change card details like name, description, due date, or status.', inputSchema: { type: 'object', properties: { apiKey: { type: 'string', description: 'Trello API key (automatically provided by Claude.app from your stored credentials)' }, token: { type: 'string', description: 'Trello API token (automatically provided by Claude.app from your stored credentials)' }, cardId: { type: 'string', description: 'ID of the card to update (you can get this from board details or card searches)', pattern: '^[a-f0-9]{24}$' }, name: { type: 'string', description: 'New name/title for the card' }, desc: { type: 'string', description: 'New description for the card' }, closed: { type: 'boolean', description: 'Set to true to archive the card, false to unarchive' }, due: { type: ['string', 'null'], format: 'date-time', description: 'Set due date (ISO 8601 format) or null to remove due date' }, dueComplete: { type: 'boolean', description: 'Mark the due date as complete (true) or incomplete (false)' }, idList: { type: 'string', description: 'Move card to a different list by providing the list ID', pattern: '^[a-f0-9]{24}$' }, pos: { oneOf: [ { type: 'number', minimum: 0 }, { type: 'string', enum: ['top', 'bottom'] } ], description: 'Change position in the list: "top", "bottom", or specific number' } }, required: ['apiKey', 'token', 'cardId'] } };