Skip to main content
Glama

list_boards

Retrieve all Trello boards accessible to your account, with options to filter by open, closed, or all boards for quick access and organization.

Instructions

List all Trello boards accessible to the user. Use this to see all boards you have access to, or filter by status.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
apiKeyYesTrello API key (automatically provided by Claude.app from your stored credentials)
tokenYesTrello API token (automatically provided by Claude.app from your stored credentials)
filterNoFilter boards by status: "open" for active boards, "closed" for archived boards, "all" for bothopen

Implementation Reference

  • The handler function that executes the logic for the list_boards tool. It calls the Trello client to retrieve boards and formats the output.
    export async function handleListBoards(args: unknown) {
      try {
        const { apiKey, token, filter } = validateListBoards(args);
        const client = new TrelloClient({ apiKey, token });
        
        const response = await client.getMyBoards(filter);
        const boards = response.data;
        
        const summary = `Found ${boards.length} ${filter} board(s)`;
        const boardList = boards.map(board => ({
          id: board.id,
          name: board.name,
          description: board.desc || 'No description',
          url: board.shortUrl,
          lastActivity: board.dateLastActivity,
          closed: board.closed
        }));
        
        return {
          content: [
            {
              type: 'text' as const,
              text: JSON.stringify({
                summary,
                boards: boardList,
                rateLimit: response.rateLimit
              }, 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 listing boards: ${errorMessage}`
            }
          ],
          isError: true
        };
      }
    }
  • The tool definition for list_boards, including its name and input schema.
    export const listBoardsTool: Tool = {
      name: 'list_boards',
      description: 'List all Trello boards accessible to the user. Use this to see all boards you have access to, or filter by status.',
      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)'
          },
          filter: {
            type: 'string',
            enum: ['all', 'open', 'closed'],
            description: 'Filter boards by status: "open" for active boards, "closed" for archived boards, "all" for both',
            default: 'open'
          }
        },
        required: ['apiKey', 'token']
      }
    };
  • The validation schema for the input arguments of list_boards.
    export const listBoardsSchema = z.object({
      apiKey: z.string().min(1, 'API key is required'),
      token: z.string().min(1, 'Token is required'),
      filter: z.enum(['all', 'open', 'closed']).optional().default('open')
    });
    
    export const getBoardSchema = z.object({
      apiKey: z.string().min(1, 'API key is required'),
      token: z.string().min(1, 'Token is required'),
      boardId: trelloIdSchema,
      includeDetails: z.boolean().optional().default(false)
    });
    
    export const getBoardListsSchema = z.object({
      apiKey: z.string().min(1, 'API key is required'),
      token: z.string().min(1, 'Token is required'),
      boardId: trelloIdSchema,
      filter: z.enum(['all', 'open', 'closed']).optional().default('open')
    });
    
    export const createCardSchema = z.object({
      apiKey: z.string().min(1, 'API key is required'),
      token: z.string().min(1, 'Token is required'),
      name: z.string().min(1, 'Card name is required').max(16384, 'Card name too long'),
      desc: z.string().max(16384, 'Description too long').optional(),
      idList: trelloIdSchema,
      pos: z.union([z.number().min(0), z.enum(['top', 'bottom'])]).optional(),
      due: z.string().datetime().optional(),
      idMembers: z.array(trelloIdSchema).optional(),
      idLabels: z.array(trelloIdSchema).optional()
    });
    
    export const updateCardSchema = z.object({
      apiKey: z.string().min(1, 'API key is required'),
      token: z.string().min(1, 'Token is required'),
      cardId: trelloIdSchema,
      name: z.string().min(1).max(16384).optional(),
      desc: z.string().max(16384).optional(),
      closed: z.boolean().optional(),
      due: z.string().datetime().nullable().optional(),
      dueComplete: z.boolean().optional(),
      idList: trelloIdOptionalSchema,
      pos: z.union([z.number().min(0), z.enum(['top', 'bottom'])]).optional(),
      idMembers: z.array(trelloIdSchema).optional(),
      idLabels: z.array(trelloIdSchema).optional()
    });
    
    export const moveCardSchema = z.object({
      apiKey: z.string().min(1, 'API key is required'),
      token: z.string().min(1, 'Token is required'),
      cardId: trelloIdSchema,
      idList: trelloIdSchema,
      pos: z.union([z.number().min(0), z.enum(['top', 'bottom'])]).optional()
    });
    
    export const getCardSchema = z.object({
      apiKey: z.string().min(1, 'API key is required'),
      token: z.string().min(1, 'Token is required'),
      cardId: trelloIdSchema,
      includeDetails: z.boolean().optional().default(false)
    });
    
    export const deleteCardSchema = z.object({
      apiKey: z.string().min(1, 'API key is required'),
      token: z.string().min(1, 'Token is required'),
      cardId: trelloIdSchema
    });
    
    export function validateCredentials(data: unknown) {
      return credentialsSchema.parse(data);
    }
    
    export function validateListBoards(data: unknown) {
      return listBoardsSchema.parse(data);
    }
    
    export function validateGetBoard(data: unknown) {

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/kocakli/Trello-Desktop-MCP'

If you have feedback or need assistance with the MCP directory API, please join our Discord server