Skip to main content
Glama
agrath

Atlassian Trello MCP Server

trello_get_card_checklists

Retrieve all checklists and their items from a specific Trello card. Provide the card ID or URL to fetch checklists with optional item inclusion and field selection.

Instructions

Get all checklists and their items for a specific Trello card.

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)
cardIdYesID or URL of the card (e.g. "abc123" or "https://trello.com/c/abc123/1-title")
checkItemsNoInclude checklist items in responseall
fieldsNoOptional: specific fields to include (e.g., ["name", "pos"])

Implementation Reference

  • The main handler function for trello_get_card_checklists. It extracts credentials and params, validates input via validateGetCardChecklists, calls TrelloClient.getCardChecklists(), and formats the response with checklists and their items.
    export async function handleTrelloGetCardChecklists(args: unknown) {
      try {
        const { credentials, params } = extractCredentials(args);
        const { cardId, checkItems, fields} = validateGetCardChecklists(params);
        const client = new TrelloClient(credentials);
    
        const response = await client.getCardChecklists(cardId, {
          ...(checkItems && { checkItems }),
          ...(fields && { fields })
        });
        const checklists = response.data;
    
        const result = {
          summary: `Found ${checklists.length} checklist(s) for card`,
          cardId,
          checklists: checklists.map(checklist => ({
            id: checklist.id,
            name: checklist.name,
            position: checklist.pos,
            checkItems: checklist.checkItems?.map((item: any) => ({
              id: item.id,
              name: item.name,
              state: item.state,
              position: item.pos,
              due: item.due,
              nameData: item.nameData
            })) || []
          })),
          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 card checklists: ${errorMessage}`
            }
          ],
          isError: true
        };
      }
    }
  • Validation schema for the getCardChecklists tool. Validates cardId (using trelloIdSchema), optional checkItems string, and optional fields array.
    const validateGetCardChecklists = (args: unknown) => {
      const schema = z.object({
    
        cardId: trelloIdSchema,
        checkItems: z.string().optional(),
        fields: z.array(z.string()).optional()
      });
    
      return schema.parse(args);
    };
  • Tool definition object for trello_get_card_checklists, including name, description, and inputSchema with apiKey, token, cardId (required), checkItems (enum all/none), and fields array.
    export const trelloGetCardChecklistsTool: Tool = {
      name: 'trello_get_card_checklists',
      description: 'Get all checklists and their items for a specific Trello card.',
      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)'
          },
          cardId: {
            type: 'string',
            description: 'ID or URL of the card (e.g. "abc123" or "https://trello.com/c/abc123/1-title")',
    
          },
          checkItems: {
            type: 'string',
            enum: ['all', 'none'],
            description: 'Include checklist items in response',
            default: 'all'
          },
          fields: {
            type: 'array',
            items: { type: 'string' },
            description: 'Optional: specific fields to include (e.g., ["name", "pos"])'
          }
        },
        required: ['cardId']
      }
    };
  • src/server.ts:57-58 (registration)
    Import of the tool definition and handler in the server entry point.
    trelloGetCardChecklistsTool,
    handleTrelloGetCardChecklists,
  • src/server.ts:179-179 (registration)
    Registration of trelloGetCardChecklistsTool in the server's tool list.
    trelloGetCardChecklistsTool,
  • src/server.ts:295-296 (registration)
    Routing of the 'trello_get_card_checklists' tool name to the handleTrelloGetCardChecklists handler function.
    case 'trello_get_card_checklists':
      return await handleTrelloGetCardChecklists(args);
  • TrelloClient.getCardChecklists() method that makes the actual API call to GET /cards/{cardId}/checklists with optional checkItems and fields parameters.
    async getCardChecklists(cardId: string, options?: {
      checkItems?: string;
      fields?: string[];
    }): Promise<TrelloApiResponse<TrelloChecklist[]>> {
      const params: Record<string, string> = {};
    
      if (options?.checkItems) {
        params.checkItems = options.checkItems;
      }
      if (options?.fields) {
        params.fields = options.fields.join(',');
      }
    
      return this.makeRequest<TrelloChecklist[]>(
        `/cards/${cardId}/checklists`,
        { params },
        `Get checklists for card ${cardId}`
      );
    }
  • TypeScript interfaces TrelloChecklist (id, name, idBoard, idCard, pos, checkItems) and TrelloCheckItem (id, name, state, pos, due, idMember) used by the tool.
    export interface TrelloChecklist {
      id: string;
      name: string;
      idBoard: string;
      idCard: string;
      pos: number;
      checkItems: TrelloCheckItem[];
    }
    
    export interface TrelloCheckItem {
      id: string;
      name: string;
      state: 'complete' | 'incomplete';
      pos: number;
      due: string | null;
      idMember: string | null;
    }
Behavior3/5

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

With no annotations, the description only states it retrieves checklists and items. It does not disclose potential behavior like empty result handling, pagination, or error conditions. Adequate but minimal for a read operation.

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

Conciseness4/5

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

A single sentence that is concise and front-loaded. No redundant words. Could be slightly expanded to add useful context without becoming verbose.

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

Completeness2/5

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

Lacks information about the return format, especially since there is no output schema. Does not explain how to use the fields parameter or that checkItems defaults to 'all'. Incomplete for an agent to fully understand the tool's behavior.

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?

All parameters are fully described in the input schema (100% coverage). The description adds no additional meaning or context beyond what the schema already provides, e.g., it doesn't clarify the effect of the checkItems or fields parameters.

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 the action ('get') and resource ('all checklists and their items for a specific Trello card'). Distinguishes from sibling tools like trello_get_checklist (single checklist) and trello_get_check_item (single item).

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

Usage Guidelines2/5

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

No guidance on when to use this tool vs. alternatives such as trello_get_checklist or trello_get_check_items. Does not explain when to choose this over other checklist-related tools.

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