Skip to main content
Glama

get_contact

Retrieve a specific contact's details from the Keila newsletter platform by providing their unique contact ID.

Instructions

Fetch a single contact by ID.

Args: contact_id: The contact ID (e.g. "c_12345").

Returns: A dict with contact details: id, email, first_name, last_name, status, data.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
contact_idYes

Implementation Reference

  • The MCP tool handler function 'get_contact' registered with @mcp.tool() which calls the underlying KeilaClient.get_contact method.
    @mcp.tool()
    def get_contact(contact_id: str) -> dict:
        """
        Fetch a single contact by ID.
    
        Args:
            contact_id: The contact ID (e.g. "c_12345").
    
        Returns:
            A dict with contact details: id, email, first_name, last_name, status, data.
        """
        return _client.get_contact(contact_id)
  • client.py:49-56 (handler)
    The implementation logic of the KeilaClient.get_contact method which performs the HTTP GET request to the Keila API.
    def get_contact(self, contact_id: str, id_type: str | None = None) -> dict:
        """Fetch a single contact by ID."""
        params = {}
        if id_type:
            params["id_type"] = id_type
        resp = self.session.get(f"{self.url}/api/v1/contacts/{contact_id}", params=params, headers=self._headers(), timeout=30)
        resp.raise_for_status()
        return resp.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/gwbischof/keila-mcp'

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