Skip to main content
Glama

list_contacts

Retrieve and display all contacts from the Keila newsletter system with pagination support. View contact details including email, name, status, and timestamps.

Instructions

List all contacts in Keila with pagination.

Args: page: Page number for pagination (optional).

Returns: A dict with 'data' (list of contacts) and 'meta' (pagination info). Each contact has id, email, first_name, last_name, status, data, and timestamps.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pageNo

Implementation Reference

  • MCP tool handler for listing contacts, which delegates the call to the KeilaClient.
    @mcp.tool()
    def list_contacts(page: int | None = None) -> dict:
        """
        List all contacts in Keila with pagination.
    
        Args:
            page: Page number for pagination (optional).
    
        Returns:
            A dict with 'data' (list of contacts) and 'meta' (pagination info).
            Each contact has id, email, first_name, last_name, status, data, and timestamps.
        """
        return _client.list_contacts(page=page)
  • The actual API client implementation for listing contacts via HTTP request.
    def list_contacts(self, page: int | None = None, filter: dict | None = None) -> dict:
        """List contacts with optional pagination and filtering."""
        params = {}
        if page is not None:
            params["paginate[page]"] = page
        if filter:
            for key, val in filter.items():
                params[f"filter[{key}]"] = val
        resp = self.session.get(f"{self.url}/api/v1/contacts", 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