Skip to main content
Glama
effytech

Freshdesk MCP server

by effytech

update_contact

Modify contact details in Freshdesk by specifying the contact ID and updating relevant fields. Streamline customer data management within the Freshdesk ecosystem.

Instructions

Update a contact in Freshdesk.

Input Schema

NameRequiredDescriptionDefault
contact_fieldsYes
contact_idYes

Input Schema (JSON Schema)

{ "properties": { "contact_fields": { "title": "Contact Fields", "type": "object" }, "contact_id": { "title": "Contact Id", "type": "integer" } }, "required": [ "contact_id", "contact_fields" ], "title": "update_contactArguments", "type": "object" }

Implementation Reference

  • The handler function for the 'update_contact' tool, decorated with @mcp.tool() which serves as its registration in the MCP server. This function implements the core logic to update a contact in Freshdesk by sending a PUT request to the /api/v2/contacts/{contact_id} endpoint with the provided fields.
    @mcp.tool() async def update_contact(contact_id: int, contact_fields: Dict[str, Any])-> Dict[str, Any]: """Update 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()}" } data = {} for field, value in contact_fields.items(): data[field] = value async with httpx.AsyncClient() as client: response = await client.put(url, headers=headers, json=data) return response.json() @mcp.tool()

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/effytech/freshdesk_mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server