{"q":"leads","category":"","count":20,"rows":[{"key":"LEADS_SCORE_AI","type":"fn","category":"biz-dev","target":"leadsScoreAI","planner_rank":6,"docs":"WHAT: AI ICP scoring — one Grok (grok-4.3) call scores a batch of enriched leads 0-100 on real wholesale/white-label peptide buying fit, grounded in OUTREACH_DOSSIER. Writes score + an icp: note (buyer type, volume guess, concrete reason) so LEADS_LIST ranks by commercial fit instead of has-a-website. WHEN_TO_USE: after enrichment, before drafting; \"score the leads\", \"which leads are actually worth emailing\". ARGS: $1 = batch size (default 8, cap 10). Call repeatedly until it returns scored:0. EX: [LEADS_SCORE_AI]8[/LEADS_SCORE_AI]"},{"key":"LEADS_VERIFY_MX","type":"fn","category":"biz-dev","target":"leadsVerifyMx","planner_rank":6,"docs":"WHAT: Verify whether the email domain publishes MX records using DNS-over-HTTPS. Tags mx:ok or mx:none. This verifies the domain, not the individual mailbox.\\n# WHEN_TO_USE: after enrichment and before ICP scoring or drafting.\\n# ARGS: $1=max leads (default 25, cap 50).\\n# EX: [LEADS_VERIFY_MX]25[/LEADS_VERIFY_MX]\\n[\"$1\"]"},{"key":"CONTACTS_LIST","type":"fn","category":"leads","target":"contactsList","planner_rank":20,"docs":"WHAT: List contact objects with optional filter. ARGS: $1 = JSON {status?,segment?,city?,limit?} or a bare status word. EX: [CONTACTS_LIST]drafted[/CONTACTS_LIST]"},{"key":"CONTACT_GET","type":"fn","category":"leads","target":"contactGet","planner_rank":20,"docs":"WHAT: Get a lead as a canonical CONTACT object (channels, fit score, signals, provenance). ARGS: $1 = lead id or contact:<id>. EX: [CONTACT_GET]811[/CONTACT_GET]"},{"key":"EMAILS_SENT","type":"fn","category":"leads","target":"emailsSent","planner_rank":20,"docs":"WHAT: List recent sent emails with open/click engagement + totals (sent-email visibility). WHEN_TO_USE: see everything sent and who opened/clicked. ARGS: $1 = limit (default 50). EX: [EMAILS_SENT]50[/EMAILS_SENT]"},{"key":"EMAIL_SEND_TRACKED","type":"fn","category":"leads","target":"emailSendTracked","planner_rank":20,"docs":"WHAT: Send a tracked email (open pixel + wrapped click links) and record it in email_sends. WHEN_TO_USE: any owner-authorized send where you want open/click visibility. ARGS: $1 = JSON {to, subject, body, kind?, lead_id?, from?, from_name?, reply_to?}. EX: [EMAIL_SEND_TRACKED]{\"to\":\"x@y.com\",\"subject\":\"hi\",\"body\":\"see https://leoresearch.com\"}[/EMAIL_SEND_TRACKED]"},{"key":"LEADS_DISCOVER_NPI","type":"fn","category":"leads","target":"leadsDiscoverNpi","planner_rank":20,"docs":"WHAT: Discover leads from the NPPES NPI Registry (authoritative federal provider directory, free/no key). Real clinic identity + phone + address; no website (run LEADS_RESOLVE_SITES to backfill). WHEN_TO_USE: broad authoritative discovery of clinics/providers by taxonomy + city/state. ARGS: $1=taxonomy_description, $2=city, $3=state(2-letter), $4=limit(default 200). EX: [LEADS_DISCOVER_NPI]Nurse Practitioner|Miami|FL|200[/LEADS_DISCOVER_NPI]"},{"key":"LEADS_DISCOVER_PLACES","type":"fn","category":"leads","target":"leadsDiscoverPlaces","planner_rank":20,"docs":"WHAT: Discover B2B leads via Google Places API (New) — med-spas/clinics/longevity by segment + city, with website/phone/rating. Better coverage than the Overpass source. Inserts into the leads table. WHEN_TO_USE: \"find medspas in Newport Beach\", building the wholesale target list. ARGS: $1=segment free text (e.g. \"medical spa\",\"longevity clinic\"), $2=city, $3=limit (default 40). EX: [LEADS_DISCOVER_PLACES]medical spa|Newport Beach|40[/LEADS_DISCOVER_PLACES]"},{"key":"LEADS_RESOLVE_SITES","type":"fn","category":"leads","target":"leadsResolveSitesPlaces","planner_rank":20,"docs":"WHAT: Backfill missing websites on siteless leads (NPPES/OSM) by looking them up on Google Places by name+city, so the enrichment crawler can reach them. WHEN_TO_USE: after LEADS_DISCOVER_NPI or OSM discovery, before enrichment. ARGS: $1=limit(default 20). EX: [LEADS_RESOLVE_SITES]25[/LEADS_RESOLVE_SITES]"},{"key":"LEADS_DRAFT_AI","type":"fn","category":"biz-dev","target":"leadsDraftAI","planner_rank":33,"docs":"WHAT: Grok drafts one review-only outreach email grounded in OUTREACH_DOSSIER and the business site. DOES NOT SEND. Hard-blocks unless email domain MX is verified, ICP score is at least 65, site context is sufficient, and recipient is not suppressed.\\n# WHEN_TO_USE: only after enrichment, MX verification, and ICP scoring.\\n# ARGS: $1=lead id, $2=brand (default LeoResearch).\\n# EX: [LEADS_DRAFT_AI]131|LeoResearch[/LEADS_DRAFT_AI]\\n[\"$1\",\"$2\"]"},{"key":"LEADS_SEND","type":"fn","category":"biz-dev","target":"leadsSend","planner_rank":33,"docs":"WHAT: Send ONE lead's already-saved email through the owner-reviewed Marketing admin. WHEN_TO_USE: only after Cyrus reviewed the exact recipient, subject, and body in Admin → Marketing → Leads, approved that exact copy, and separately clicked Send. SAFETY: literal CONFIRM alone is insufficient. $4 must be a current, unexpired, single-use approval token tied to the saved recipient+subject+body hash. Editing copy invalidates approval. Terminal keys/share tokens cannot mint approval. ARGS: $1=CONFIRM, $2=lead id, $3=from local-part, $4=owner-browser exact-copy approval token."},{"key":"LEADS_SEND_BATCH","type":"fn","category":"biz-dev","target":"leadsSendBatch","planner_rank":33,"docs":"WHAT: Batch outreach sending is disabled. WHEN_TO_USE: never; use the owner-reviewed individual send path in Admin → Marketing → Leads. SAFETY: always returns batch_send_disabled and sends nothing until a campaign-level exact-copy review surface is explicitly built and approved."},{"key":"LEADS_DISCOVER","type":"fn","category":"biz-dev","target":"leadsDiscover","planner_rank":34,"docs":"WHAT: Find businesses likely to buy peptides wholesale or want white-label, by type and city. Free source (OpenStreetMap), no API key. Writes new rows to the leads table. WHEN_TO_USE: start a new outreach batch for a place. ARGS: $1 = segment (medspa | clinic | wellness | gym | supplement), $2 = city, $3 = max results (default 40). EX: [LEADS_DISCOVER]medspa|Los Angeles|40[/LEADS_DISCOVER]"},{"key":"LEADS_DISCOVER_AI","type":"fn","category":"biz-dev","target":"leadsDiscoverAI","planner_rank":34,"docs":"WHAT: SCRAPER 2 — Grok live web search finds real businesses (with verified official websites) that OpenStreetMap does not have. Inserts them as new leads, source=grok-live-search. WHEN_TO_USE: grow the pipeline in a city where LEADS_DISCOVER (OSM) returned few results, or to reach richer segments (longevity, weightloss, chiro). ARGS: $1 = segment (medspa|clinic|wellness|gym|supplement|chiro|massage|weightloss|longevity), $2 = city, $3 = count (default 20, cap 30). EX: [LEADS_DISCOVER_AI]longevity|Scottsdale|20[/LEADS_DISCOVER_AI]"},{"key":"LEADS_DRAFT","type":"fn","category":"biz-dev","target":"leadsDraft","planner_rank":34,"docs":"WHAT: Write a wholesale + white-label outreach email for one lead. Saves the draft on the lead. DOES NOT SEND. WHEN_TO_USE: after enrich, to prepare the message for Cyrus to approve. ARGS: $1 = lead id, $2 = which company it comes from (default miscsubjects). EX: [LEADS_DRAFT]12|miscsubjects[/LEADS_DRAFT]"},{"key":"LEADS_ENRICH","type":"fn","category":"biz-dev","target":"leadsEnrich","planner_rank":34,"docs":"WHAT: Visit one lead's website and pull the best contact email. Sets the lead to enriched or no_email. WHEN_TO_USE: after discovery, to get an email to reach out to. ARGS: $1 = lead id. EX: [LEADS_ENRICH]12[/LEADS_ENRICH]"},{"key":"LEADS_ENRICH_BATCH","type":"fn","category":"biz-dev","target":"leadsEnrichBatch","planner_rank":34,"docs":"WHAT: Enrich the next batch of un-enriched leads in one call (finds emails + context). Bounded so it never fails; call repeatedly to work through the queue. WHEN_TO_USE: after discovery, to fill in emails and context for many leads. ARGS: $1 = how many to do this call (default 8, max 10). EX: [LEADS_ENRICH_BATCH]10[/LEADS_ENRICH_BATCH]"},{"key":"LEADS_FIND_SITES","type":"fn","category":"biz-dev","target":"leadsFindSites","planner_rank":34,"docs":"WHAT: Rescue websiteless leads — one Grok live-search call finds official websites for a batch of leads that have name+city but no site. Found leads stay status=new so LEADS_ENRICH_BATCH picks them up. WHEN_TO_USE: when leads sit in status=new with no website (OSM often lacks the website tag) — they are unreachable until this runs. ARGS: $1 = batch size (default 8, cap 10). EX: [LEADS_FIND_SITES]8[/LEADS_FIND_SITES]"},{"key":"LEADS_LIST","type":"fn","category":"biz-dev","target":"leadsList","planner_rank":34,"docs":"WHAT: List leads and a count by status (new, enriched, drafted, no_email, sent). WHEN_TO_USE: see the outreach pipeline. ARGS: $1 = status filter (optional; blank = all). EX: [LEADS_LIST]drafted[/LEADS_LIST]"},{"key":"LEADS_REENRICH","type":"fn","category":"biz-dev","target":"leadsReenrich","planner_rank":34,"docs":"WHAT: Second pass over status=no_email leads with the deep crawler (mailto links, Cloudflare-obfuscated emails, JSON-LD, /contact-us + /about pages — none of which the v1 crawler read). WHEN_TO_USE: rescue contactable emails from the no_email pool without any new discovery. ARGS: $1 = batch size (default 6, cap 8). EX: [LEADS_REENRICH]6[/LEADS_REENRICH]"}]}