archive_card
Move a specific Trello card to the archive using its unique ID for organized board management, ensuring efficient task cleanup and workspace maintenance.
Instructions
Send a card to the archive
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cardId | Yes | ID of the card to archive |
Implementation Reference
- src/index.ts:266-272 (handler)MCP CallToolRequest handler for 'archive_card' tool: validates arguments and calls TrelloClient.archiveCardcase 'archive_card': { const validArgs = validateArchiveCardRequest(args); const card = await this.trelloClient.archiveCard(validArgs.cardId); return { content: [{ type: 'text', text: JSON.stringify(card, null, 2) }], }; }
- src/trello-client.ts:137-144 (handler)Core implementation of archiving a Trello card by setting 'closed: true' via API PUT requestasync archiveCard(cardId: string): Promise<TrelloCard> { return this.handleRequest(async () => { const response = await this.axiosInstance.put(`/cards/${cardId}`, { closed: true, }); return response.data; }); }
- src/validators.ts:92-99 (schema)Input schema validation function ensuring 'cardId' is provided and is a stringexport function validateArchiveCardRequest(args: Record<string, unknown>): { cardId: string } { if (!args.cardId) { throw new McpError(ErrorCode.InvalidParams, 'cardId is required'); } return { cardId: validateString(args.cardId, 'cardId'), }; }
- src/index.ts:164-177 (registration)Tool registration in ListTools response, defining name, description, and input schema{ name: 'archive_card', description: 'Send a card to the archive', inputSchema: { type: 'object', properties: { cardId: { type: 'string', description: 'ID of the card to archive', }, }, required: ['cardId'], }, },