delete_lead
Permanently remove a lead from all campaigns and lists while deleting all associated data and history. This action cannot be reversed.
Instructions
๐๏ธ PERMANENTLY delete a lead. CANNOT UNDO!
This action:
Removes the lead from all campaigns and lists
Deletes all lead data and history
Cannot be reversed
Confirm with user before executing!
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| params | Yes |
Implementation Reference
- src/instantly_mcp/tools/leads.py:341-354 (handler)The core handler function that executes the delete_lead tool by calling the API DELETE /leads/{lead_id} endpoint.
async def delete_lead(params: DeleteLeadInput) -> str: """ ๐๏ธ PERMANENTLY delete a lead. CANNOT UNDO! This action: - Removes the lead from all campaigns and lists - Deletes all lead data and history - Cannot be reversed Confirm with user before executing! """ client = get_client() result = await client.delete(f"/leads/{params.lead_id}") return json.dumps({"success": True, "deleted": params.lead_id, **result}, indent=2) - Pydantic input schema for the delete_lead tool, requiring a lead_id.
class DeleteLeadInput(BaseModel): """Input for deleting a lead. ๐๏ธ PERMANENTLY delete. CANNOT UNDO!""" model_config = ConfigDict(str_strip_whitespace=True, extra="ignore") lead_id: str = Field(..., description="Lead UUID to DELETE") - src/instantly_mcp/tools/leads.py:450-463 (registration)The LEAD_TOOLS list registers delete_lead among lead management tools, imported and dynamically registered in server.py.
LEAD_TOOLS = [ list_leads, get_lead, create_lead, update_lead, list_lead_lists, create_lead_list, update_lead_list, get_verification_stats_for_lead_list, add_leads_to_campaign_or_list_bulk, delete_lead, delete_lead_list, move_leads_to_campaign_or_list, ] - src/instantly_mcp/server.py:96-97 (registration)MCP annotations for the delete_lead tool, marking it as destructive and requiring confirmation.
"delete_lead": {"destructiveHint": True, "confirmationRequiredHint": True}, "delete_lead_list": {"destructiveHint": True, "confirmationRequiredHint": True},