update_ticket_summary
Modify the summary of a Freshdesk ticket by specifying the ticket ID and updated body. Automates ticket management for streamlined customer support operations.
Instructions
Update the summary of a ticket in Freshdesk.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| body | Yes | ||
| ticket_id | Yes |
Input Schema (JSON Schema)
{
"properties": {
"body": {
"title": "Body",
"type": "string"
},
"ticket_id": {
"title": "Ticket Id",
"type": "integer"
}
},
"required": [
"ticket_id",
"body"
],
"title": "update_ticket_summaryArguments",
"type": "object"
}
Implementation Reference
- src/freshdesk_mcp/server.py:1202-1223 (handler)The main handler function for the 'update_ticket_summary' tool, decorated with @mcp.tool() for automatic registration. It performs a PUT request to the Freshdesk API to update the ticket summary with the provided body.@mcp.tool() async def update_ticket_summary(ticket_id: int, body: str) -> Dict[str, Any]: """Update 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" } data = { "body": body } async with httpx.AsyncClient() as client: try: response = await client.put(url, headers=headers, json=data) response.raise_for_status() return response.json() except httpx.HTTPStatusError as e: return {"error": f"Failed to update ticket summary: {str(e)}"} except Exception as e: return {"error": f"An unexpected error occurred: {str(e)}"}
- src/freshdesk_mcp/server.py:1202-1202 (registration)The @mcp.tool() decorator registers the update_ticket_summary function as an MCP tool.@mcp.tool()