update_card_details
Modify card details on Trello, including name, description, due date, and labels, using the card ID for precise updates. Simplifies card management without manual intervention.
Instructions
Update an existing card's details
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cardId | Yes | ID of the card to update | |
| description | No | New description for the card | |
| dueDate | No | New due date for the card (ISO 8601 format) | |
| labels | No | New array of label IDs for the card | |
| name | No | New name for the card |
Implementation Reference
- src/trello-client.ts:119-135 (handler)Core implementation of updating card details via Trello API PUT request.async updateCard(params: { cardId: string; name?: string; description?: string; dueDate?: string; labels?: string[]; }): Promise<TrelloCard> { return this.handleRequest(async () => { const response = await this.axiosInstance.put(`/cards/${params.cardId}`, { name: params.name, desc: params.description, due: params.dueDate, idLabels: params.labels, }); return response.data; }); }
- src/index.ts:258-264 (handler)MCP CallTool handler case for 'update_card_details' that validates and delegates to TrelloClient.case 'update_card_details': { const validArgs = validateUpdateCardRequest(args); const card = await this.trelloClient.updateCard(validArgs); return { content: [{ type: 'text', text: JSON.stringify(card, null, 2) }], }; }
- src/validators.ts:73-90 (schema)Input validation function for update_card_details tool parameters.export function validateUpdateCardRequest(args: Record<string, unknown>): { cardId: string; name?: string; description?: string; dueDate?: string; labels?: string[]; } { if (!args.cardId) { throw new McpError(ErrorCode.InvalidParams, 'cardId is required'); } return { cardId: validateString(args.cardId, 'cardId'), name: validateOptionalString(args.name), description: validateOptionalString(args.description), dueDate: validateOptionalString(args.dueDate), labels: validateOptionalStringArray(args.labels), }; }
- src/index.ts:131-163 (registration)Tool registration including name, description, and input schema for ListTools response.{ name: 'update_card_details', description: 'Update an existing card\'s details', inputSchema: { type: 'object', properties: { cardId: { type: 'string', description: 'ID of the card to update', }, name: { type: 'string', description: 'New name for the card', }, description: { type: 'string', description: 'New description for the card', }, dueDate: { type: 'string', description: 'New due date for the card (ISO 8601 format)', }, labels: { type: 'array', items: { type: 'string', }, description: 'New array of label IDs for the card', }, }, required: ['cardId'], }, },