get_ticket
Retrieve support ticket details from Freshdesk using a specified ticket ID to streamline customer service and enhance support operations.
Instructions
Get a ticket in Freshdesk.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ticket_id | Yes |
Input Schema (JSON Schema)
{
"properties": {
"ticket_id": {
"title": "Ticket Id",
"type": "integer"
}
},
"required": [
"ticket_id"
],
"title": "get_ticketArguments",
"type": "object"
}
Implementation Reference
- src/freshdesk_mcp/server.py:371-382 (handler)The core handler function for the 'get_ticket' MCP tool. It is decorated with @mcp.tool() which serves as both the handler implementation and registration in FastMCP. Fetches ticket details from Freshdesk API using the provided ticket_id.@mcp.tool() async def get_ticket(ticket_id: int): """Get a ticket in Freshdesk.""" url = f"https://{FRESHDESK_DOMAIN}/api/v2/tickets/{ticket_id}" headers = { "Authorization": f"Basic {base64.b64encode(f'{FRESHDESK_API_KEY}:X'.encode()).decode()}" } async with httpx.AsyncClient() as client: response = await client.get(url, headers=headers) return response.json()