Skip to main content
Glama
bcharleson

Instantly MCP Server

create_lead_list

Build targeted lead lists for email outreach campaigns, with optional enrichment to add company details and social profiles automatically.

Instructions

Create a lead list.

Set has_enrichment_task=true to enable automatic lead enrichment. Enrichment adds company info, social profiles, and other data.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
paramsYes

Implementation Reference

  • The main execution function (handler) for the create_lead_list tool. It constructs the request body from input params and makes a POST request to the Instantly API's /lead-lists endpoint to create the lead list.
    async def create_lead_list(params: CreateLeadListInput) -> str:
        """
        Create a lead list.
        
        Set has_enrichment_task=true to enable automatic lead enrichment.
        Enrichment adds company info, social profiles, and other data.
        """
        client = get_client()
        
        body: dict[str, Any] = {
            "name": params.name,
        }
        
        if params.has_enrichment_task is not None:
            body["has_enrichment_task"] = params.has_enrichment_task
        if params.owned_by:
            body["owned_by"] = params.owned_by
        
        result = await client.post("/lead-lists", json=body)
        return json.dumps(result, indent=2)
  • Pydantic input schema (BaseModel) defining the parameters for create_lead_list: required name, optional has_enrichment_task and owned_by.
    class CreateLeadListInput(BaseModel):
        """
        Input for creating a lead list.
        
        Set has_enrichment_task=true for auto-enrich.
        """
        
        model_config = ConfigDict(str_strip_whitespace=True, extra="ignore")
        
        name: str = Field(..., description="List name")
        has_enrichment_task: Optional[bool] = Field(default=None)
        owned_by: Optional[str] = Field(default=None, description="Owner UUID")
  • Registration of create_lead_list within the LEAD_TOOLS list, which is used to register all lead-related tools with the MCP server.
    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,
    ]
  • Tool annotation in TOOL_ANNOTATIONS dictionary specifying behavior hints (destructiveHint: False) for create_lead_list, used during MCP tool registration.
    "create_lead_list": {"destructiveHint": False},

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