get_lead
Retrieve comprehensive lead details including contact information, campaign membership, sequence status, and custom variables by providing the lead ID.
Instructions
Get lead details by ID.
Returns comprehensive lead information including:
Contact details (email, name, company, phone)
Custom variables
Campaign/list membership
Sequence status and history
Interest status
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| params | Yes |
Implementation Reference
- src/instantly_mcp/tools/leads.py:90-103 (handler)The main handler function for the 'get_lead' tool. Fetches lead details by ID from the Instantly API and returns JSON.async def get_lead(params: GetLeadInput) -> str: """ Get lead details by ID. Returns comprehensive lead information including: - Contact details (email, name, company, phone) - Custom variables - Campaign/list membership - Sequence status and history - Interest status """ client = get_client() result = await client.get(f"/leads/{params.lead_id}") return json.dumps(result, indent=2)
- Pydantic input schema for the get_lead tool, requiring a lead_id.class GetLeadInput(BaseModel): """Input for getting lead details.""" model_config = ConfigDict(str_strip_whitespace=True, extra="ignore") lead_id: str = Field(..., description="Lead UUID")
- src/instantly_mcp/server.py:57-128 (registration)Global registration of all tools including get_lead with FastMCP, including specific readOnlyHint annotation.def register_tools(): """Register all tools with MCP annotations.""" # Import tool modules dynamically based on categories tools = get_all_tools() # Tool annotations mapping # readOnlyHint: Tool only reads data # destructiveHint: Tool modifies/deletes data # confirmationRequiredHint: Requires user confirmation TOOL_ANNOTATIONS = { # Account tools "list_accounts": {"readOnlyHint": True}, "get_account": {"readOnlyHint": True}, "create_account": {"destructiveHint": False}, "update_account": {"destructiveHint": False}, "manage_account_state": {"destructiveHint": False}, "delete_account": {"destructiveHint": True, "confirmationRequiredHint": True}, # Campaign tools "create_campaign": {"destructiveHint": False}, "list_campaigns": {"readOnlyHint": True}, "get_campaign": {"readOnlyHint": True}, "update_campaign": {"destructiveHint": False}, "activate_campaign": {"destructiveHint": False}, "pause_campaign": {"destructiveHint": False}, "delete_campaign": {"destructiveHint": True, "confirmationRequiredHint": True}, "search_campaigns_by_contact": {"readOnlyHint": True}, # Lead tools "list_leads": {"readOnlyHint": True}, "get_lead": {"readOnlyHint": True}, "create_lead": {"destructiveHint": False}, "update_lead": {"destructiveHint": False}, "list_lead_lists": {"readOnlyHint": True}, "create_lead_list": {"destructiveHint": False}, "update_lead_list": {"destructiveHint": False}, "get_verification_stats_for_lead_list": {"readOnlyHint": True}, "add_leads_to_campaign_or_list_bulk": {"destructiveHint": False}, "delete_lead": {"destructiveHint": True, "confirmationRequiredHint": True}, "delete_lead_list": {"destructiveHint": True, "confirmationRequiredHint": True}, "move_leads_to_campaign_or_list": {"destructiveHint": False}, # Email tools "list_emails": {"readOnlyHint": True}, "get_email": {"readOnlyHint": True}, "reply_to_email": {"destructiveHint": True, "confirmationRequiredHint": True}, "count_unread_emails": {"readOnlyHint": True}, "verify_email": {"readOnlyHint": True}, "mark_thread_as_read": {"destructiveHint": False}, # Analytics tools "get_campaign_analytics": {"readOnlyHint": True}, "get_daily_campaign_analytics": {"readOnlyHint": True}, "get_warmup_analytics": {"readOnlyHint": True}, # Background job tools "list_background_jobs": {"readOnlyHint": True}, "get_background_job": {"readOnlyHint": True}, } for tool_func in tools: tool_name = tool_func.__name__ annotations = TOOL_ANNOTATIONS.get(tool_name, {}) # Register tool with FastMCP mcp.tool( name=tool_name, annotations=annotations, )(tool_func) print(f"[Instantly MCP] ✅ Registered {len(tools)} tools", file=sys.stderr)
- src/instantly_mcp/tools/leads.py:450-463 (registration)Local collection of lead tools including get_lead for use in get_all_tools() registration.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, ]