delete_list
Archive Trello lists to remove them from active boards while preserving data for reference or restoration.
Instructions
Archives a list.
Args:
list_id (str): The ID of the list to close.
Returns:
TrelloList: The archived list object.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| list_id | Yes |
Implementation Reference
- server/tools/list.py:109-127 (handler)The MCP tool handler function that executes the delete_list tool logic by archiving a Trello list using the ListService.async def delete_list(ctx: Context, list_id: str) -> TrelloList: """Archives a list. Args: list_id (str): The ID of the list to close. Returns: TrelloList: The archived list object. """ try: logger.info(f"Archiving list: {list_id}") result = await service.delete_list(list_id) logger.info(f"Successfully archived list: {list_id}") return result except Exception as e: error_msg = f"Failed to delete list: {str(e)}" logger.error(error_msg) await ctx.error(error_msg) raise
- server/tools/tools.py:21-21 (registration)Registration of the delete_list tool with the MCP server.mcp.add_tool(list.delete_list)
- server/services/list.py:70-82 (helper)Supporting service method that performs the Trello API PUT request to archive (close) the list.async def delete_list(self, list_id: str) -> TrelloList: """Archives a list. Args: list_id (str): The ID of the list to close. Returns: TrelloList: The archived list object. """ response = await self.client.PUT( f"/lists/{list_id}/closed", data={"value": "true"} ) return TrelloList(**response)