get_lists
Retrieve all lists from a Trello board to organize tasks, track progress, and manage workflows using the board ID.
Instructions
Retrieves all lists on a given board.
Args:
board_id (str): The ID of the board whose lists to retrieve.
Returns:
List[TrelloList]: A list of list objects.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| board_id | Yes |
Implementation Reference
- server/tools/list.py:41-59 (handler)The MCP tool handler function for get_lists that retrieves lists for a board by calling the ListService.async def get_lists(ctx: Context, board_id: str) -> List[TrelloList]: """Retrieves all lists on a given board. Args: board_id (str): The ID of the board whose lists to retrieve. Returns: List[TrelloList]: A list of list objects. """ try: logger.info(f"Getting lists for board: {board_id}") result = await service.get_lists(board_id) logger.info(f"Successfully retrieved {len(result)} lists for board: {board_id}") return result except Exception as e: error_msg = f"Failed to get lists: {str(e)}" logger.error(error_msg) await ctx.error(error_msg) raise
- server/tools/tools.py:18-18 (registration)Registration of the get_lists tool in the MCP server.mcp.add_tool(list.get_lists)
- server/services/list.py:28-39 (helper)The underlying service method that calls the Trello API to fetch lists for the given board.async def get_lists(self, board_id: str) -> List[TrelloList]: """Retrieves all lists on a given board. Args: board_id (str): The ID of the board whose lists to retrieve. Returns: List[TrelloList]: A list of list objects. """ response = await self.client.GET(f"/boards/{board_id}/lists") return [TrelloList(**list_data) for list_data in response]