Skip to main content
Glama
diegofornalha

MCP Server Trello

get_cards_by_list_id

Retrieve all cards from a specified Trello list by providing the list ID. Simplify card management and integration with Trello boards using structured data.

Instructions

Fetch cards from a specific Trello list

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
listIdYesID of the Trello list

Implementation Reference

  • MCP server tool handler for 'get_cards_by_list_id': validates arguments using validateGetCardsListRequest, calls TrelloClient.getCardsByList, and returns JSON stringified cards.
    case 'get_cards_by_list_id': {
      const validArgs = validateGetCardsListRequest(args);
      const cards = await this.trelloClient.getCardsByList(validArgs.listId);
      return {
        content: [{ type: 'text', text: JSON.stringify(cards, null, 2) }],
      };
    }
  • Input schema validation function specifically for the get_cards_by_list_id tool, ensuring listId is a non-empty string.
    export function validateGetCardsListRequest(args: Record<string, unknown>): { listId: string } {
      if (!args.listId) {
        throw new McpError(ErrorCode.InvalidParams, 'listId is required');
      }
      return {
        listId: validateString(args.listId, 'listId'),
      };
    }
  • src/index.ts:62-74 (registration)
    Registration of the 'get_cards_by_list_id' tool in the MCP server, including name, description, and input schema definition.
      name: 'get_cards_by_list_id',
      description: 'Fetch cards from a specific Trello list',
      inputSchema: {
        type: 'object',
        properties: {
          listId: {
            type: 'string',
            description: 'ID of the Trello list',
          },
        },
        required: ['listId'],
      },
    },
  • TrelloClient helper method implementing the core logic: makes authenticated API request to fetch cards from the specified list ID, with rate limiting and error handling.
    async getCardsByList(listId: string): Promise<TrelloCard[]> {
      console.error(`[TrelloClient] Getting cards for list: ${listId}`);
      return this.handleRequest(async () => {
        const response = await this.axiosInstance.get(`/lists/${listId}/cards`);
        return response.data;
      });
    }
Behavior2/5

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

No annotations are provided, so the description carries full burden for behavioral disclosure. It states the tool fetches cards but doesn't describe what 'fetch' entails—e.g., whether it returns all cards, supports pagination, requires authentication, or has rate limits. For a read operation with zero annotation coverage, this leaves critical behavioral traits unspecified.

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?

The description is a single, clear sentence with zero wasted words. It front-loads the core purpose ('Fetch cards') and specifies the scope ('from a specific Trello list'), making it efficient and easy to parse. Every word earns its place without redundancy.

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

Completeness3/5

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

For a simple read tool with one parameter and no output schema, the description is minimally adequate but incomplete. It lacks behavioral details (e.g., response format, error handling) and usage context, which are important given no annotations. However, the purpose is clear, and the parameter is well-documented in the schema, making it functional but with gaps.

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?

The schema description coverage is 100%, with the single parameter 'listId' documented as 'ID of the Trello list'. The description adds no additional meaning beyond this, such as format examples or where to obtain the ID. Given high schema coverage, the baseline score of 3 is appropriate, as the schema adequately covers parameter semantics.

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

Purpose4/5

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

The description clearly states the action ('Fetch') and target resource ('cards from a specific Trello list'), making the purpose immediately understandable. However, it doesn't differentiate from sibling tools like 'get_my_cards' or 'get_recent_activity' that also retrieve cards or activity data, leaving some ambiguity about when to choose this specific tool.

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?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention prerequisites, context for selecting this over siblings like 'get_my_cards' (which might fetch cards across lists), or any constraints on usage. The agent must infer usage from the name and parameters alone.

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

Related 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/diegofornalha/mcp-server-trello'

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