Skip to main content
Glama
m0xai

Trello MCP Server with Python

by m0xai

update_list

Rename Trello lists to organize project workflows by providing the list ID and new name.

Instructions

Updates the name of a list.

Args:
    list_id (str): The ID of the list to update.
    name (str): The new name for the list.

Returns:
    TrelloList: The updated list object.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
list_idYes
nameYes

Implementation Reference

  • MCP tool handler for 'update_list' that calls the ListService to update a Trello list's name.
    async def update_list(ctx: Context, list_id: str, name: str) -> TrelloList:
        """Updates the name of a list.
    
        Args:
            list_id (str): The ID of the list to update.
            name (str): The new name for the list.
    
        Returns:
            TrelloList: The updated list object.
        """
        try:
            logger.info(f"Updating list {list_id} with new name: {name}")
            result = await service.update_list(list_id, name)
            logger.info(f"Successfully updated list: {list_id}")
            return result
        except Exception as e:
            error_msg = f"Failed to update list: {str(e)}"
            logger.error(error_msg)
            await ctx.error(error_msg)
            raise
  • Registration of the 'update_list' tool in the MCP server.
    mcp.add_tool(list.update_list)
  • Helper service method that makes the Trello API call to update the list name.
    async def update_list(self, list_id: str, name: str) -> TrelloList:
        """Updates the name of a list.
    
        Args:
            list_id (str): The ID of the list to update.
            name (str): The new name for the list.
    
        Returns:
            TrelloList: The updated list object.
        """
        response = await self.client.PUT(f"/lists/{list_id}", data={"name": name})
        return TrelloList(**response)

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