delete_ticket_summary
Remove ticket summaries in Freshdesk using a specified ticket ID to streamline support ticket management and maintain cleaner records.
Instructions
Delete the summary of a ticket in Freshdesk.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ticket_id | Yes |
Implementation Reference
- src/freshdesk_mcp/server.py:1224-1245 (handler)The main handler function for the 'delete_ticket_summary' tool. It sends a DELETE request to the Freshdesk API to remove the summary of the specified ticket. Includes error handling and success response formatting. The @mcp.tool() decorator registers it as an MCP tool.@mcp.tool() async def delete_ticket_summary(ticket_id: int) -> Dict[str, Any]: """Delete the summary of a ticket in Freshdesk.""" url = f"https://{FRESHDESK_DOMAIN}/api/v2/tickets/{ticket_id}/summary" headers = { "Authorization": f"Basic {base64.b64encode(f'{FRESHDESK_API_KEY}:X'.encode()).decode()}", "Content-Type": "application/json" } async with httpx.AsyncClient() as client: try: response = await client.delete(url, headers=headers) if response.status_code == 204: return {"success": True, "message": "Ticket summary deleted successfully"} response.raise_for_status() return response.json() except httpx.HTTPStatusError as e: return {"error": f"Failed to delete ticket summary: {str(e)}"} except Exception as e: return {"error": f"An unexpected error occurred: {str(e)}"}
- src/freshdesk_mcp/server.py:1224-1224 (registration)The @mcp.tool() decorator registers the delete_ticket_summary function as an MCP tool.@mcp.tool()