Skip to main content
Glama
m0xai

Trello MCP Server with Python

by m0xai

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
NameRequiredDescriptionDefault
list_idYes

Implementation Reference

  • 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
  • Registration of the 'get_list' tool in the MCP server using mcp.add_tool.
    mcp.add_tool(list.get_list)
  • 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)
  • Instantiation of the ListService used by the tool handlers.
    service = ListService(client)

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