Skip to main content
Glama
m0xai

Trello MCP Server with Python

by m0xai

get_board_labels

Retrieve all labels for a specific Trello board to organize and categorize tasks effectively.

Instructions

Retrieves all labels for a specific board.

Args:
    board_id (str): The ID of the board whose labels to retrieve.

Returns:
    List[TrelloLabel]: A list of label objects for the board.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
board_idYes

Implementation Reference

  • The main MCP tool handler function `get_board_labels` that executes the tool logic: logs the request, calls the BoardService to fetch labels, logs success, returns the list, or handles and reports errors via ctx.error.
    async def get_board_labels(ctx: Context, board_id: str) -> List[TrelloLabel]:
        """Retrieves all labels for a specific board.
    
        Args:
            board_id (str): The ID of the board whose labels to retrieve.
    
        Returns:
            List[TrelloLabel]: A list of label objects for the board.
        """
        try:
            logger.info(f"Getting labels for board: {board_id}")
            result = await service.get_board_labels(board_id)
            logger.info(f"Successfully retrieved {len(result)} labels for board: {board_id}")
            return result
        except Exception as e:
            error_msg = f"Failed to get board labels: {str(e)}"
            logger.error(error_msg)
            await ctx.error(error_msg)
            raise
  • Registers the `get_board_labels` tool with the MCP server by adding it to the tools list.
    mcp.add_tool(board.get_board_labels)
  • Helper service method in BoardService that makes the Trello API call to fetch board labels and deserializes the response into a list of TrelloLabel objects.
    async def get_board_labels(self, board_id: str) -> List[TrelloLabel]:
        """Retrieves all labels for a specific board.
    
        Args:
            board_id (str): The ID of the board whose labels to retrieve.
    
        Returns:
            List[TrelloLabel]: A list of label objects for the board.
        """
        response = await self.client.GET(f"/boards/{board_id}/labels")
        return [TrelloLabel(**label) for label in response]
Behavior3/5

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

With no annotations provided, the description carries the full burden. It discloses that this is a read operation ('Retrieves'), which is useful, but lacks details on permissions, rate limits, pagination, or error handling. The return type is mentioned but not elaborated, leaving behavioral gaps.

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 front-loaded with the core purpose, followed by structured Args and Returns sections. Every sentence earns its place, with no redundant information, making it efficient and easy to parse.

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?

Given the low complexity (one parameter, no output schema, no annotations), the description is reasonably complete: it states the purpose, parameter semantics, and return type. However, it lacks behavioral details like error cases or performance hints, which would enhance completeness for a read tool.

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 meaning beyond the input schema by explaining that board_id is 'The ID of the board whose labels to retrieve', clarifying the parameter's role. With 0% schema description coverage and only one parameter, this compensates adequately, though it could specify format or sourcing.

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?

The description clearly states the verb ('Retrieves') and resource ('all labels for a specific board'), making the purpose explicit. It distinguishes from sibling tools like get_board (which retrieves board details) or get_cards (which retrieves cards), establishing a specific scope.

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

Usage Guidelines3/5

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

The description implies usage by specifying 'for a specific board' via the board_id parameter, but does not explicitly state when to use this tool versus alternatives like get_board (which might include labels) or create_board_label (for adding labels). No exclusions or prerequisites are mentioned.

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