get_boards
Retrieve all Trello boards for the authenticated user to view and manage project workspaces.
Instructions
Retrieves all boards for the authenticated user.
Returns:
List[TrelloBoard]: A list of board objects.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- server/tools/board.py:41-56 (handler)The MCP tool handler function that executes the get_boards tool logic by calling the BoardService.get_boards() method.async def get_boards(ctx: Context) -> List[TrelloBoard]: """Retrieves all boards for the authenticated user. Returns: List[TrelloBoard]: A list of board objects. """ try: logger.info("Getting all boards") result = await service.get_boards() logger.info(f"Successfully retrieved {len(result)} boards") return result except Exception as e: error_msg = f"Failed to get boards: {str(e)}" logger.error(error_msg) await ctx.error(error_msg) raise
- server/models.py:6-15 (schema)Pydantic model used for output validation of TrelloBoard objects returned by get_boards.class TrelloBoard(BaseModel): """Model representing a Trello board.""" id: str name: str desc: str | None = None closed: bool = False idOrganization: str | None = None url: str
- server/tools/tools.py:12-12 (registration)Registration of the get_boards tool with the MCP server.mcp.add_tool(board.get_boards)
- server/services/board.py:31-42 (helper)Supporting service method that fetches boards from the Trello API using the TrelloClient.async def get_boards(self, member_id: str = "me") -> List[TrelloBoard]: """Retrieves all boards for a given member. Args: member_id (str): The ID of the member whose boards to retrieve. Defaults to "me" for the authenticated user. Returns: List[TrelloBoard]: A list of board objects. """ response = await self.client.GET(f"/members/{member_id}/boards") return [TrelloBoard(**board) for board in response]