delete_list
Archive a Trello list to remove it from active view while preserving its data for future reference.
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 for the 'delete_list' tool. It logs the action, calls the ListService to archive the list, logs success, and returns the result. Handles errors by logging and notifying via ctx.error.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)Registers the delete_list tool from the list module with the MCP server instance.mcp.add_tool(list.delete_list)
- server/services/list.py:70-82 (helper)Helper service method in ListService that archives (sets closed=true) the specified Trello list via the Trello API and returns the TrelloList model.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)