Skip to main content
Glama

update_contact

Modify contact details in Keila newsletter system by updating email, first name, or last name for existing contacts.

Instructions

Update an existing contact.

Args: contact_id: The contact ID (e.g. "c_12345"). email: New email address (optional). first_name: New first name (optional). last_name: New last name (optional).

Returns: The updated contact record.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
contact_idYes
emailNo
first_nameNo
last_nameNo

Implementation Reference

  • mcp_server.py:64-79 (registration)
    Registration of the "update_contact" MCP tool.
    @mcp.tool()
    def update_contact(contact_id: str, email: str | None = None, first_name: str | None = None,
                       last_name: str | None = None) -> dict:
        """
        Update an existing contact.
    
        Args:
            contact_id: The contact ID (e.g. "c_12345").
            email: New email address (optional).
            first_name: New first name (optional).
            last_name: New last name (optional).
    
        Returns:
            The updated contact record.
        """
        return _client.update_contact(contact_id, email=email, first_name=first_name, last_name=last_name)
  • client.py:74-92 (handler)
    The actual Keila API client implementation for updating a contact.
    def update_contact(self, contact_id: str, email: str | None = None, first_name: str | None = None,
                       last_name: str | None = None, data: dict | None = None, id_type: str | None = None) -> dict:
        """Update an existing contact."""
        contact_data = {}
        if email:
            contact_data["email"] = email
        if first_name is not None:
            contact_data["first_name"] = first_name
        if last_name is not None:
            contact_data["last_name"] = last_name
        if data:
            contact_data["data"] = data
        params = {}
        if id_type:
            params["id_type"] = id_type
        resp = self.session.patch(f"{self.url}/api/v1/contacts/{contact_id}", json={"data": contact_data},
                                 params=params, 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, so description carries full burden. Mentions return value ('updated contact record') but omits mutation safety details, error behavior (e.g., what if contact_id not found), side effects, or reversibility concerns critical for an update operation.

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

Conciseness3/5

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

Uses docstring format (Args/Returns) which is slightly verbose for MCP but information is front-loaded. The Returns section earns its place given the lack of output schema, though the structure could be more compact.

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

Completeness2/5

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

Adequate for basic parameter documentation but insufficient for an update operation with no annotations. Missing error handling details, authentication requirements, and guidance on how to handle partial updates (unset vs unchanged fields).

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

Parameters4/5

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

With 0% schema description coverage, the description compensates effectively by documenting all 4 parameters: contact_id includes an example format ('c_12345'), and optional fields (email, first_name, last_name) are explicitly marked with their purpose ('New email address', etc.).

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 verb (Update) and resource (contact) clearly. The word 'existing' helps distinguish from the 'create_contact' sibling, though it doesn't explicitly contrast with other siblings like 'delete_contact' or 'get_contact'.

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?

No guidance on when to use this versus 'create_contact' or prerequisites like needing to obtain a contact_id first. No mention of partial update semantics (PATCH vs PUT) or idempotency expectations.

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