Skip to main content
Glama
m0xai

Trello MCP Server with Python

by m0xai

get_cards

Retrieve all cards from a specific Trello list using the list ID to view and manage card details.

Instructions

Retrieves all cards in a given list.

Args:
    list_id (str): The ID of the list whose cards to retrieve.

Returns:
    List[TrelloCard]: A list of card objects.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
list_idYes

Implementation Reference

  • MCP tool handler for 'get_cards': retrieves cards from a Trello list using CardService, logs actions, handles errors with ctx.error.
    async def get_cards(ctx: Context, list_id: str) -> List[TrelloCard]:
        """Retrieves all cards in a given list.
    
        Args:
            list_id (str): The ID of the list whose cards to retrieve.
    
        Returns:
            List[TrelloCard]: A list of card objects.
        """
        try:
            logger.info(f"Getting cards for list: {list_id}")
            result = await service.get_cards(list_id)
            logger.info(f"Successfully retrieved {len(result)} cards for list: {list_id}")
            return result
        except Exception as e:
            error_msg = f"Failed to get cards: {str(e)}"
            logger.error(error_msg)
            await ctx.error(error_msg)
            raise
  • Registration of the 'get_cards' tool with the MCP server via mcp.add_tool.
    mcp.add_tool(card.get_cards)
  • CardService method that implements the core logic by calling Trello API to fetch cards from a list.
    async def get_cards(self, list_id: str) -> List[TrelloCard]:
        """Retrieves all cards in a given list.
    
        Args:
            list_id (str): The ID of the list whose cards to retrieve.
    
        Returns:
            List[TrelloCard]: A list of card objects.
        """
        response = await self.client.GET(f"/lists/{list_id}/cards")
        return [TrelloCard(**card) for card in response]
Behavior2/5

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

With no annotations provided, the description carries full burden for behavioral disclosure. It states this is a retrieval operation but doesn't mention whether it requires authentication, has rate limits, returns paginated results, or what happens if the list_id is invalid. This leaves significant gaps for a tool that interacts with an external API.

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 efficiently structured with a clear purpose statement followed by Args and Returns sections. Every sentence adds value without redundancy, making it easy to parse and understand quickly.

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 operation with one parameter and no output schema, the description covers basics but lacks important context. Without annotations or output schema, it should ideally mention authentication needs, error handling, or return format details beyond just 'card objects.'

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

Parameters4/5

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

The description adds meaningful context for the single parameter by explaining that list_id identifies 'the list whose cards to retrieve.' Since schema description coverage is 0% and there's only one parameter, this adequately compensates, though it doesn't specify format requirements or constraints.

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 ('Retrieves') and resource ('all cards in a given list'), making the tool's purpose immediately understandable. However, it doesn't explicitly differentiate from sibling tools like 'get_card' (singular) or 'get_board' which retrieves different resources, so it misses the top score.

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 sibling tools like 'get_card' (for a single card) or 'get_board' (which might include cards), nor does it specify prerequisites or contextual constraints for usage.

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

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