update_list
Rename Trello lists by providing the list ID and new name to organize boards effectively.
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
| Name | Required | Description | Default |
|---|---|---|---|
| list_id | Yes | ||
| name | Yes |
Implementation Reference
- server/tools/list.py:87-106 (handler)MCP tool handler for updating a Trello list name. Calls the ListService and handles errors.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
- server/tools/tools.py:20-20 (registration)Registers the update_list tool with the MCP server.mcp.add_tool(list.update_list)
- server/services/list.py:57-68 (helper)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)