Skip to main content
Glama

trello_get_list_cards

Retrieve all cards from a specific Trello list to view tasks and items in a workflow column. Filter by open, closed, or all cards and select specific fields to display.

Instructions

Get all cards in a specific Trello list. Use this to see all tasks/items in a workflow column.

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)
listIdYesID of the list to get cards from (you can get this from get_lists)
filterNoFilter cards by status: "open" for active cards, "closed" for archived cards, "all" for bothopen
fieldsNoOptional: specific fields to include (e.g., ["name", "desc", "due", "labels", "members"])

Implementation Reference

  • The handler function that fetches cards from a specific Trello list using the Trello client.
    export async function handleTrelloGetListCards(args: unknown) {
      try {
        const { apiKey, token, listId, filter, fields } = validateGetListCards(args);
        const client = new TrelloClient({ apiKey, token });
        
        const response = await client.getListCards(listId, { 
          ...(filter && { filter }),
          ...(fields && { fields })
        });
        const cards = response.data;
        
        const result = {
          summary: `Found ${cards.length} ${filter || 'open'} card(s) in list`,
          listId,
          cards: cards.map(card => ({
            id: card.id,
            name: card.name,
            description: card.desc || 'No description',
            url: card.shortUrl,
            listId: card.idList,
            boardId: card.idBoard,
            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
            })) || []
  • The tool definition including the schema for inputs and the tool name.
    export const trelloGetListCardsTool: Tool = {
      name: 'trello_get_list_cards',
      description: 'Get all cards in a specific Trello list. Use this to see all tasks/items in a workflow column.',
      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)'
          },
          listId: {
            type: 'string',
            description: 'ID of the list to get cards from (you can get this from get_lists)',
            pattern: '^[a-f0-9]{24}$'
          },
          filter: {
            type: 'string',
            enum: ['all', 'open', 'closed'],
            description: 'Filter cards by status: "open" for active cards, "closed" for archived cards, "all" for both',
            default: 'open'
          },
          fields: {
            type: 'array',
            items: { type: 'string' },
            description: 'Optional: specific fields to include (e.g., ["name", "desc", "due", "labels", "members"])'
          }
        },
        required: ['apiKey', 'token', 'listId']
      }
    };

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