update_card
Modify card details in Trello by providing the card ID and updated properties to change information on existing cards.
Instructions
Update properties of a specific card
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| request | Yes |
Implementation Reference
- src/index.ts:194-200 (handler)Handler logic for the 'update_card' tool: parses arguments, calls TrelloClient.updateCard, and returns the updated card as JSON.case 'update_card': { const { card_id, update_data } = (request.params.arguments as { request: UpdateCardRequest }).request; const updatedCard = await this.trelloClient.updateCard(card_id, update_data); return { content: [{ type: 'text', text: JSON.stringify(updatedCard, null, 2) }], }; }
- src/types.ts:58-61 (schema)TypeScript interface defining the input structure for update_card: card_id and update_data.export interface UpdateCardRequest { card_id: string; update_data: Partial<Card>; }
- src/index.ts:132-157 (registration)Tool registration in ListToolsRequestHandler, including name, description, and input schema matching UpdateCardRequest.{ name: 'update_card', description: 'Update properties of a specific card', inputSchema: { type: 'object', properties: { request: { type: 'object', properties: { card_id: { type: 'string', description: 'ID of the card', }, update_data: { type: 'object', description: 'Properties to update on the card', additionalProperties: true, }, }, required: ['card_id', 'update_data'], }, }, required: ['request'], title: 'update_cardArguments', }, },
- src/trello-client.ts:45-51 (helper)Core implementation of card update via Trello API using axios PUT request.async updateCard(cardId: string, updateData: Partial<Card>): Promise<Card> { const response = await axios.put( `${this.baseUrl}/cards/${cardId}?${this.getAuthParams()}`, updateData ); return response.data; }