Skip to main content
Glama

create_contact

Add new contacts to Keila's newsletter system by providing email and optional name details for targeted communication.

Instructions

Create a new contact in Keila.

Args: email: Email address (required). first_name: First name (optional). last_name: Last name (optional).

Returns: The created contact record.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
emailYes
first_nameNo
last_nameNo

Implementation Reference

  • The MCP tool registration and handler wrapper for creating a contact.
    @mcp.tool()
    def create_contact(email: str, first_name: str | None = None, last_name: str | None = None) -> dict:
        """
        Create a new contact in Keila.
    
        Args:
            email: Email address (required).
            first_name: First name (optional).
            last_name: Last name (optional).
    
        Returns:
            The created contact record.
        """
        return _client.create_contact(email=email, first_name=first_name, last_name=last_name)
  • client.py:58-72 (handler)
    The actual Keila API client implementation that sends the request to create a contact.
    def create_contact(self, email: str, first_name: str | None = None, last_name: str | None = None,
                       external_id: str | None = None, data: dict | None = None) -> dict:
        """Create a new contact."""
        contact_data = {"email": email}
        if first_name:
            contact_data["first_name"] = first_name
        if last_name:
            contact_data["last_name"] = last_name
        if external_id:
            contact_data["external_id"] = external_id
        if data:
            contact_data["data"] = data
        resp = self.session.post(f"{self.url}/api/v1/contacts", json={"data": contact_data}, headers=self._headers(), timeout=30)
        resp.raise_for_status()
        return resp.json()
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations provided, yet description only mentions basic return value without disclosing uniqueness constraints, idempotency, or error conditions like existing contact conflicts.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Docstring format with Args/Returns sections is structured and concise with no redundant text, though extremely terse given context poverty.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Covers basic CRUD operation with param list and return mention, but given zero schema descriptions and no annotations, lacks depth on behavioral edge cases and field constraints.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Args section compensates for 0% schema description coverage by listing parameters and optionality, but provides minimal semantic detail beyond field names (e.g., no email format validation rules).

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States specific action (Create) and resource (contact) with system context (Keila), though lacks explicit differentiation from update_contact sibling.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Provides no guidance on when to use versus update_contact, no prerequisites mentioned, and no error handling guidance for duplicate emails.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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