Skip to main content
Glama

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
NameRequiredDescriptionDefault
paramsYes

Implementation Reference

  • 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")
  • 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, ]
  • 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},

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/bcharleson/instantly-mcp-python'

If you have feedback or need assistance with the MCP directory API, please join our Discord server