update_ticket_conversation
Modify a specific conversation in Freshdesk tickets by updating its content. Streamline support operations by ensuring accurate and up-to-date customer interactions.
Instructions
Update a conversation for a ticket in Freshdesk.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| body | Yes | ||
| conversation_id | Yes |
Input Schema (JSON Schema)
{
"properties": {
"body": {
"title": "Body",
"type": "string"
},
"conversation_id": {
"title": "Conversation Id",
"type": "integer"
}
},
"required": [
"conversation_id",
"body"
],
"title": "update_ticket_conversationArguments",
"type": "object"
}
Implementation Reference
- src/freshdesk_mcp/server.py:434-451 (handler)The @mcp.tool() decorator registers and the function implements the update_ticket_conversation tool, sending a PUT request to the Freshdesk API to update a conversation's body.@mcp.tool() async def update_ticket_conversation(conversation_id: int,body: str)-> Dict[str, Any]: """Update a conversation for a ticket in Freshdesk.""" url = f"https://{FRESHDESK_DOMAIN}/api/v2/conversations/{conversation_id}" 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.put(url, headers=headers, json=data) status_code = response.status_code if status_code == 200: return response.json() else: return f"Cannot update conversation ${response.json()}"