get_list
Retrieve a specific Trello list by its ID to access list details and contents for project management tasks.
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 MCP tool handler function that executes the logic to retrieve a Trello list by its ID, delegating 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)Registration of the 'get_list' tool in the MCP server using mcp.add_tool.mcp.add_tool(list.get_list)
- server/services/list.py:16-27 (helper)The ListService method that performs the actual API call to fetch the Trello list data.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)
- server/tools/list.py:16-17 (helper)Instantiation of the ListService used by the tool handlers.service = ListService(client)