Skip to main content
Glama
m0xai

Trello MCP Server with Python

by m0xai

delete_card

Remove a card from Trello boards using its unique ID to manage board content and organization.

Instructions

Deletes a card.

Args: card_id (str): The ID of the card to delete. Returns: dict: The response from the delete operation.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
card_idYes

Implementation Reference

  • The MCP tool handler function for 'delete_card'. It handles the context, logging, error handling, and delegates to CardService.delete_card.
    async def delete_card(ctx: Context, card_id: str) -> dict: """Deletes a card. Args: card_id (str): The ID of the card to delete. Returns: dict: The response from the delete operation. """ try: logger.info(f"Deleting card: {card_id}") result = await service.delete_card(card_id) logger.info(f"Successfully deleted card: {card_id}") return result except Exception as e: error_msg = f"Failed to delete card: {str(e)}" logger.error(error_msg) await ctx.error(error_msg) raise
  • Registration of the 'delete_card' tool in the MCP server using mcp.add_tool.
    mcp.add_tool(card.delete_card)
  • The underlying CardService helper method that executes the Trello API DELETE request for the card.
    async def delete_card(self, card_id: str) -> Dict[str, Any]: """Deletes a card. Args: card_id (str): The ID of the card to delete. Returns: Dict[str, Any]: The response from the delete operation. """ return await self.client.DELETE(f"/cards/{card_id}")

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