Skip to main content
Glama
effytech

Freshdesk MCP server

by effytech

list_contacts

Retrieve and manage all Freshdesk contacts with pagination support for efficient customer relationship management. Automate support operations and enhance ticket handling.

Instructions

List all contacts in Freshdesk with pagination support.

Input Schema

NameRequiredDescriptionDefault
pageNo
per_pageNo

Input Schema (JSON Schema)

{ "properties": { "page": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": 1, "title": "Page" }, "per_page": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": 30, "title": "Per Page" } }, "title": "list_contactsArguments", "type": "object" }

Implementation Reference

  • The main handler function for the 'list_contacts' tool. It is registered via the @mcp.tool() decorator, which also serves as the registration. The function fetches a paginated list of contacts from the Freshdesk API and returns the JSON response. Input schema is inferred from type hints: optional page and per_page parameters.
    @mcp.tool() async def list_contacts(page: Optional[int] = 1, per_page: Optional[int] = 30)-> list[Dict[str, Any]]: """List all contacts in Freshdesk with pagination support.""" url = f"https://{FRESHDESK_DOMAIN}/api/v2/contacts" headers = { "Authorization": f"Basic {base64.b64encode(f'{FRESHDESK_API_KEY}:X'.encode()).decode()}" } params = { "page": page, "per_page": per_page } async with httpx.AsyncClient() as client: response = await client.get(url, headers=headers, params=params) return response.json()

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