trello_get_board_labels
Retrieve all available labels from a specific Trello board to categorize and organize cards effectively.
Instructions
Get all labels available on a specific Trello board for categorizing cards.
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 labels for |
Implementation Reference
- src/tools/advanced.ts:570-615 (handler)The handler function that executes the trello_get_board_labels tool.
export async function handleTrelloGetBoardLabels(args: unknown) { try { const { apiKey, token, boardId } = validateGetBoardLabels(args); const client = new TrelloClient({ apiKey, token }); const response = await client.getBoardLabels(boardId); const labels = response.data; const result = { summary: `Found ${labels.length} label(s) on board`, boardId, labels: labels.map(label => ({ id: label.id, name: label.name, color: label.color, uses: label.uses })), 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 labels: ${errorMessage}` } ], isError: true }; } } - src/tools/advanced.ts:64-72 (schema)Input validation schema for the tool arguments.
const validateGetBoardLabels = (args: unknown) => { const schema = z.object({ apiKey: z.string().min(1, 'API key is required'), token: z.string().min(1, 'Token is required'), boardId: z.string().regex(/^[a-f0-9]{24}$/, 'Invalid board ID format') }); return schema.parse(args); }; - src/tools/advanced.ts:546-568 (registration)Registration of the tool with its name, description, and input schema.
export const trelloGetBoardLabelsTool: Tool = { name: 'trello_get_board_labels', description: 'Get all labels available on a specific Trello board for categorizing cards.', 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 labels for', pattern: '^[a-f0-9]{24}$' } }, required: ['apiKey', 'token', 'boardId'] } };