Skip to main content
Glama
m0xai

Trello MCP Server with Python

by m0xai

get_board

Retrieve a specific Trello board by its ID to access board details and manage tasks within the Trello MCP Server.

Instructions

Retrieves a specific board by its ID.

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

Returns:
    TrelloBoard: The board object containing board details.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
board_idYes

Implementation Reference

  • The MCP tool handler function 'get_board' that retrieves a Trello board by ID, calls the BoardService, logs activity, and handles errors.
    async def get_board(ctx: Context, board_id: str) -> TrelloBoard:
        """Retrieves a specific board by its ID.
    
        Args:
            board_id (str): The ID of the board to retrieve.
    
        Returns:
            TrelloBoard: The board object containing board details.
        """
        try:
            logger.info(f"Getting board with ID: {board_id}")
            result = await service.get_board(board_id)
            logger.info(f"Successfully retrieved board: {board_id}")
            return result
        except Exception as e:
            error_msg = f"Failed to get board: {str(e)}"
            logger.error(error_msg)
            await ctx.error(error_msg)
            raise
  • Registration of the 'get_board' tool in the MCP server via mcp.add_tool.
    mcp.add_tool(board.get_board)
  • Supporting BoardService.get_board method that makes the Trello API call to fetch the board data and parses it into a TrelloBoard model.
    async def get_board(self, board_id: str) -> TrelloBoard:
        """Retrieves a specific board by its ID.
    
        Args:
            board_id (str): The ID of the board to retrieve.
    
        Returns:
            TrelloBoard: The board object containing board details.
        """
        response = await self.client.GET(f"/boards/{board_id}")
        return TrelloBoard(**response)

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