Skip to main content
Glama
agrath

Atlassian Trello MCP Server

list_boards

Retrieve all Trello boards you have access to. Filter by open, closed, or both to focus on active or archived boards.

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
apiKeyNoTrello API key (optional if TRELLO_API_KEY env var is set)
tokenNoTrello API token (optional if TRELLO_TOKEN env var is set)
filterNoFilter boards by status: "open" for active boards, "closed" for archived boards, "all" for bothopen

Implementation Reference

  • The main handler function for the 'list_boards' tool. Extracts credentials, validates params via the schema, calls the TrelloClient to fetch boards, and returns formatted results with board details (id, name, description, url, lastActivity, closed).
    export async function handleListBoards(args: unknown) {
      try {
        const { credentials, params } = extractCredentials(args);
        const { filter } = validateListBoards(params);
        const client = new TrelloClient(credentials);
        
        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
        };
      }
    }
  • Zod schema for validating list_boards input. Defines a single optional 'filter' parameter that can be 'all', 'open', or 'closed', defaulting to 'open'.
    export const listBoardsSchema = z.object({
      filter: z.enum(['all', 'open', 'closed']).optional().default('open')
    });
  • Tool definition object for 'list_boards'. Contains name, description, and input schema (JSON Schema format) specifying the 'filter' parameter with enum values 'all', 'open', 'closed' and default 'open'.
    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 (optional if TRELLO_API_KEY env var is set)'
          },
          token: {
            type: 'string',
            description: 'Trello API token (optional if TRELLO_TOKEN env var is set)'
          },
          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: []
      }
    };
  • src/server.ts:275-384 (registration)
    Server-side case handler that routes the 'list_boards' tool name to handleListBoards(args) in the CallToolRequestSchema handler.
          case 'list_boards':
            return await handleListBoards(args);
          
          case 'get_lists':
            return await handleGetLists(args);
          
          // Member management
          case 'trello_get_member':
            return await handleTrelloGetMember(args);
          
          // Phase 3: Advanced features
          case 'trello_get_board_cards':
            return await handleTrelloGetBoardCards(args);
          
          case 'trello_get_card_actions':
            return await handleTrelloGetCardActions(args);
          
          case 'trello_get_card_attachments':
            return await handleTrelloGetCardAttachments(args);
          
          case 'trello_get_card_checklists':
            return await handleTrelloGetCardChecklists(args);
          
          case 'trello_get_board_members':
            return await handleTrelloGetBoardMembers(args);
          
          case 'trello_get_board_labels':
            return await handleTrelloGetBoardLabels(args);
    
          case 'trello_create_label':
            return await handleTrelloCreateLabel(args);
    
          case 'trello_update_label':
            return await handleTrelloUpdateLabel(args);
    
          case 'trello_add_label_to_card':
            return await handleTrelloAddLabelToCard(args);
    
          case 'trello_remove_label_from_card':
            return await handleTrelloRemoveLabelFromCard(args);
    
          case 'trello_delete_label':
            return await handleTrelloDeleteLabel(args);
    
          // Member management on cards
          case 'trello_add_member_to_card':
            return await handleTrelloAddMemberToCard(args);
    
          case 'trello_remove_member_from_card':
            return await handleTrelloRemoveMemberFromCard(args);
    
          // Custom fields
          case 'trello_get_board_custom_fields':
            return await handleTrelloGetBoardCustomFields(args);
    
          // Card archiving
          case 'trello_archive_card':
            return await handleArchiveCard(args);
    
          // List filtering
          case 'trello_filter_lists':
            return await handleTrelloFilterLists(args);
    
          // Checklist management
          case 'trello_create_checklist':
            return await handleTrelloCreateChecklist(args);
    
          case 'trello_get_checklist':
            return await handleTrelloGetChecklist(args);
    
          case 'trello_update_checklist':
            return await handleTrelloUpdateChecklist(args);
    
          case 'trello_delete_checklist':
            return await handleTrelloDeleteChecklist(args);
    
          case 'trello_get_checklist_field':
            return await handleTrelloGetChecklistField(args);
    
          case 'trello_update_checklist_field':
            return await handleTrelloUpdateChecklistField(args);
    
          case 'trello_get_board_for_checklist':
            return await handleTrelloGetBoardForChecklist(args);
    
          case 'trello_get_card_for_checklist':
            return await handleTrelloGetCardForChecklist(args);
    
          case 'trello_get_check_items':
            return await handleTrelloGetCheckItems(args);
    
          case 'trello_create_check_item':
            return await handleTrelloCreateCheckItem(args);
    
          case 'trello_get_check_item':
            return await handleTrelloGetCheckItem(args);
    
          case 'trello_delete_check_item':
            return await handleTrelloDeleteCheckItem(args);
    
          case 'trello_update_check_item':
            return await handleTrelloUpdateCheckItem(args);
    
          default:
            throw new Error(`Unknown tool: ${name}`);
        }
      });
    
      return server;
    }
  • Helper wrapper function that parses data using the listBoardsSchema.
    });
    
    export const getBoardSchema = z.object({
      boardId: trelloIdSchema,
      includeDetails: z.boolean().optional().default(false),
      descriptionMaxLength: z.number().min(0).max(10000).optional(),
      compact: z.boolean().optional()
    });
    
    export const getBoardListsSchema = z.object({
      boardId: trelloIdSchema,
      filter: z.enum(['all', 'open', 'closed']).optional().default('open')
    });
    
    export const createCardSchema = z.object({
      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.string().regex(/^\d+(\.\d+)?$/).transform(Number), z.enum(['top', 'bottom'])]).optional(),
      due: z.string().datetime().optional(),
      start: z.string().datetime().optional(),
      idMembers: z.array(trelloIdSchema).optional(),
      idLabels: z.array(trelloIdSchema).optional()
    });
    
    export const updateCardSchema = z.object({
      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(),
      start: z.string().datetime().nullable().optional(),
      idList: trelloIdOptionalSchema,
      pos: z.union([z.number().min(0), z.string().regex(/^\d+(\.\d+)?$/).transform(Number), z.enum(['top', 'bottom'])]).optional(),
      idMembers: z.array(trelloIdSchema).optional(),
      idLabels: z.array(trelloIdSchema).optional()
    });
    
    export const moveCardSchema = z.object({
      cardId: trelloIdSchema,
      idList: trelloIdSchema,
      pos: z.union([z.number().min(0), z.string().regex(/^\d+(\.\d+)?$/).transform(Number), z.enum(['top', 'bottom'])]).optional()
    });
    
    export const getCardSchema = z.object({
      cardId: trelloIdSchema,
      includeDetails: z.boolean().optional().default(false)
    });
    
    export const deleteCardSchema = z.object({
      cardId: trelloIdSchema
    });
    
    export function validateCredentials(data: unknown) {
      return credentialsSchema.parse(data);
    }
    
    export function validateListBoards(data: unknown) {
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations provided, so description must disclose behavioral traits. It states the tool lists boards and allows filtering, but omits details on pagination, authentication requirements, or response format. The parameter schema covers auth tokens, but the description does not elaborate on behavior beyond the basic functionality.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two succinct sentences with key information front-loaded. No redundant or unnecessary wording; every word contributes to understanding.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple list tool with three parameters and no output schema, the description covers the core functionality and usage. However, it could briefly mention the output format or that board objects are returned, which would improve completeness given the absence of an output schema.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so each parameter is described. The description adds 'filter by status' which repeats the schema's enum description. No additional meaning or usage context is provided beyond what the schema already offers.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

Clearly states verb 'list' and resource 'boards', specifies filtering option, and distinguishes from sibling tools by focusing on listing all accessible boards.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Indicates when to use the tool ('to see all boards you have access to, or filter by status'), but does not explicitly mention when not to use it or compare with sibling tools like trello_get_user_boards.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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/agrath/Trello-Desktop-MCP'

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