trello_get_board_cards
Retrieve all cards from a Trello board with options to filter by status, include attachments, and view member details for organized project management.
Instructions
Get all cards from a Trello board with optional filtering and detailed information like attachments and members.
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) | |
| boardId | Yes | ID of the board to get cards from (you can get this from list_boards) | |
| attachments | No | Include attachment information: "cover" for cover images, "true" for all attachments | false |
| members | No | Include member information for each card | true |
| filter | No | Filter cards by status | open |
Implementation Reference
- src/tools/advanced.ts:116-188 (handler)The handler function that executes the trello_get_board_cards tool logic.
export async function handleTrelloGetBoardCards(args: unknown) { try { const { apiKey, token, boardId, attachments, members, filter } = validateGetBoardCards(args); const client = new TrelloClient({ apiKey, token }); const response = await client.getBoardCards(boardId, { ...(attachments && { attachments }), ...(members && { members }), ...(filter && { filter }) }); const cards = response.data; const result = { summary: `Found ${cards.length} card(s) in board`, boardId, cards: cards.map(card => ({ id: card.id, name: card.name, description: card.desc || 'No description', url: card.shortUrl, listId: card.idList, position: card.pos, due: card.due, dueComplete: card.dueComplete, closed: card.closed, lastActivity: card.dateLastActivity, labels: card.labels?.map(label => ({ id: label.id, name: label.name, color: label.color })) || [], members: card.members?.map(member => ({ id: member.id, fullName: member.fullName, username: member.username })) || [], attachments: card.attachments?.map((attachment: any) => ({ id: attachment.id, name: attachment.name, url: attachment.url, mimeType: attachment.mimeType, date: attachment.date })) || [] })), rateLimit: response.rateLimit }; return { content: [ { type: 'text' as const, text: JSON.stringify(result, null, 2) } ] }; } catch (error) { const errorMessage = error instanceof z.ZodError ? formatValidationError(error) : error instanceof Error ? error.message : 'Unknown error occurred'; return { content: [ { type: 'text' as const, text: `Error getting board cards: ${errorMessage}` } ], isError: true }; } } - src/tools/advanced.ts:74-114 (schema)The tool definition, including the schema for trello_get_board_cards.
export const trelloGetBoardCardsTool: Tool = { name: 'trello_get_board_cards', description: 'Get all cards from a Trello board with optional filtering and detailed information like attachments and members.', 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)' }, boardId: { type: 'string', description: 'ID of the board to get cards from (you can get this from list_boards)', pattern: '^[a-f0-9]{24}$' }, attachments: { type: 'string', enum: ['cover', 'true', 'false'], description: 'Include attachment information: "cover" for cover images, "true" for all attachments', default: 'false' }, members: { type: 'string', enum: ['true', 'false'], description: 'Include member information for each card', default: 'true' }, filter: { type: 'string', enum: ['all', 'open', 'closed'], description: 'Filter cards by status', default: 'open' } }, required: ['apiKey', 'token', 'boardId'] } };