Skip to main content
Glama
m0xai

Trello MCP Server with Python

by m0xai

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

Implementation Reference

  • 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
  • Registers the delete_list tool from the list module with the MCP server instance.
    mcp.add_tool(list.delete_list)
  • 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)

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