get_list
Retrieve a specific Trello list by its ID to access list details and manage board organization.
Instructions
Retrieves a specific list by its ID.
Args:
list_id (str): The ID of the list to retrieve.
Returns:
TrelloList: The list object containing list details.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| list_id | Yes |
Implementation Reference
- server/tools/list.py:20-39 (handler)The main handler function for the 'get_list' MCP tool. It handles the context, logging, error handling, and delegates to the ListService.async def get_list(ctx: Context, list_id: str) -> TrelloList: """Retrieves a specific list by its ID. Args: list_id (str): The ID of the list to retrieve. Returns: TrelloList: The list object containing list details. """ try: logger.info(f"Getting list with ID: {list_id}") result = await service.get_list(list_id) logger.info(f"Successfully retrieved list: {list_id}") return result except Exception as e: error_msg = f"Failed to get list: {str(e)}" logger.error(error_msg) await ctx.error(error_msg) raise
- server/tools/tools.py:17-17 (registration)Registers the 'get_list' tool with the MCP server instance.mcp.add_tool(list.get_list)
- server/services/list.py:16-27 (helper)Helper method in ListService that makes the actual Trello API call to fetch the list by ID.async def get_list(self, list_id: str) -> TrelloList: """Retrieves a specific list by its ID. Args: list_id (str): The ID of the list to retrieve. Returns: TrelloList: The list object containing list details. """ response = await self.client.GET(f"/lists/{list_id}") return TrelloList(**response)