delete_contact
Remove a contact from the Keila newsletter system by specifying the contact ID to manage your subscriber list.
Instructions
Delete a contact.
Args: contact_id: The contact ID (e.g. "c_12345").
Returns: Confirmation message.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| contact_id | Yes |
Implementation Reference
- mcp_server.py:82-94 (handler)The MCP tool registration and handler for `delete_contact`, which calls the KeilaClient to delete the contact.
@mcp.tool() def delete_contact(contact_id: str) -> str: """ Delete a contact. Args: contact_id: The contact ID (e.g. "c_12345"). Returns: Confirmation message. """ _client.delete_contact(contact_id) return f"Contact {contact_id} deleted." - client.py:94-101 (helper)The KeilaClient method that performs the actual API request to delete a contact.
def delete_contact(self, contact_id: str, id_type: str | None = None) -> None: """Delete a contact.""" params = {} if id_type: params["id_type"] = id_type resp = self.session.delete(f"{self.url}/api/v1/contacts/{contact_id}", params=params, headers=self._headers(), timeout=30) resp.raise_for_status()