get_contact
Retrieve contact details from Freshdesk using a specific contact ID. Simplify support operations by integrating AI models to automate and manage customer interactions effectively.
Instructions
Get a contact in Freshdesk.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| contact_id | Yes |
Input Schema (JSON Schema)
{
"properties": {
"contact_id": {
"title": "Contact Id",
"type": "integer"
}
},
"required": [
"contact_id"
],
"title": "get_contactArguments",
"type": "object"
}
Implementation Reference
- src/freshdesk_mcp/server.py:488-497 (handler)The main handler function for the 'get_contact' tool. It fetches a specific contact from Freshdesk API using the provided contact_id. The @mcp.tool() decorator registers this function as an MCP tool named 'get_contact'.@mcp.tool() async def get_contact(contact_id: int)-> Dict[str, Any]: """Get a contact in Freshdesk.""" url = f"https://{FRESHDESK_DOMAIN}/api/v2/contacts/{contact_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()
- src/freshdesk_mcp/server.py:488-488 (registration)The @mcp.tool() decorator on get_contact function registers it as a tool in the FastMCP server.@mcp.tool()