create_ticket_reply
Automate ticket responses by generating replies in Freshdesk using AI integration. Input ticket ID and response content to streamline support operations efficiently.
Instructions
Create a reply to a ticket in Freshdesk.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| body | Yes | ||
| ticket_id | Yes |
Implementation Reference
- src/freshdesk_mcp/server.py:406-419 (handler)The core handler function decorated with @mcp.tool(), which registers and implements the create_ticket_reply tool. It sends a POST request to the Freshdesk API to add a reply to the specified ticket.@mcp.tool() async def create_ticket_reply(ticket_id: int,body: str)-> Dict[str, Any]: """Create a reply to a ticket in Freshdesk.""" url = f"https://{FRESHDESK_DOMAIN}/api/v2/tickets/{ticket_id}/reply" headers = { "Authorization": f"Basic {base64.b64encode(f'{FRESHDESK_API_KEY}:X'.encode()).decode()}" } data = { "body": body } async with httpx.AsyncClient() as client: response = await client.post(url, headers=headers, json=data) return response.json()