{"version":"1.0.0","generated_at":"2026-10-29T17:43:47.846Z","tool_count":104,"scopes":["admin:ai_concurrency","admin:kill_switches","admin:organization","admin:pipeline_test","read:analytics","read:applications","read:approvals","read:audit","read:billing","read:calls","read:carrier_2fa","read:carriers","read:commissions","read:compliance","read:crm","read:profile","read:qualification","read:reports","read:submission_queue","read:system","write:applications","write:carrier_sync","write:carriers","write:commissions","write:conservation","write:conversations","write:dnc","write:notifications"],"tools":[{"name":"test_pipeline","description":"Trigger end-to-end mock AI application pipeline test","scope":"admin:pipeline_test","schema":{"type":"object","properties":{},"additionalProperties":false}},{"name":"get_pipeline_status","description":"Processing + approval status for AI pipeline messages by message_ids; for a single approval record use get_approval_status","scope":"read:approvals","schema":{"type":"object","properties":{"message_ids":{"type":"array","items":{"type":"string"},"description":"Up to ~50 message UUIDs"}},"additionalProperties":false,"required":["message_ids"]}},{"name":"send_policy_summary","description":"Trigger the real policy email for an application (email only; client SMS is off)","scope":"write:notifications","schema":{"type":"object","properties":{"application_id":{"type":"string"}},"additionalProperties":false,"required":["application_id"]}},{"name":"get_approval_status","description":"Status of ONE approval by approval_id (approved/rejected/pending); for message-level status use get_pipeline_status","scope":"read:approvals","schema":{"type":"object","properties":{"approval_id":{"type":"string"}},"additionalProperties":false,"required":["approval_id"]}},{"name":"list_pending_approvals","description":"AI action approvals awaiting a human decision (the approval queue)","scope":"read:approvals","schema":{"type":"object","properties":{"agent_id":{"type":"string"},"limit":{"type":"number"}},"additionalProperties":false}},{"name":"list_ai_messages","description":"Recent AI-drafted client messages (email; historical SMS rows included) with their approval status; this is the message log, not the queue (use list_pending_approvals)","scope":"read:approvals","schema":{"type":"object","properties":{"trigger":{"type":"string"},"limit":{"type":"number"}},"additionalProperties":false}},{"name":"list_applications","description":"List, filter, or SEARCH applications — by status/carrier/agent, or a `search` term (client name or phone) to find a specific caller’s application","scope":"read:applications","schema":{"type":"object","properties":{"agent_id":{"type":"string"},"status":{"type":"string"},"carrier":{"type":"string"},"search":{"type":"string","description":"Client name or phone to locate an application"},"from_date":{"type":"string","description":"YYYY-MM-DD, inclusive"},"to_date":{"type":"string","description":"YYYY-MM-DD, inclusive"},"limit":{"type":"number"}},"additionalProperties":false}},{"name":"get_application","description":"Get one application by id","scope":"read:applications","schema":{"type":"object","properties":{"application_id":{"type":"string"}},"additionalProperties":false,"required":["application_id"]}},{"name":"append_application_note","description":"Record a durable, immutable note or case event (e.g. an opt-out/DNC request) on an application in the append-only event_log; does not change the application status; returns the note id","scope":"write:conversations","schema":{"type":"object","properties":{"application_id":{"type":"string"},"note":{"type":"string"},"event_type":{"type":"string"},"source":{"type":"string"},"author":{"type":"string"},"created_at":{"type":"string"},"metadata":{"type":"object","additionalProperties":{}}},"additionalProperties":false,"required":["application_id","note"]}},{"name":"get_application_notes","description":"Return an application's durable notes/events from the event_log, oldest-first","scope":"read:applications","schema":{"type":"object","properties":{"application_id":{"type":"string"},"event_type":{"type":"string"},"limit":{"type":"number"}},"additionalProperties":false,"required":["application_id"]}},{"name":"get_lead_memory","description":"Recall durable facts already known about a contact across prior calls, texts, and applications (coverage goal, budget, existing coverage, objections). Call BEFORE drafting a client-facing reply so it references what the client already said","scope":"read:applications","schema":{"type":"object","properties":{"phone":{"type":"string","description":"Client phone number, any format"},"agent_id":{"type":"string","description":"Agent UUID owning the contact — always agent-scoped"}},"additionalProperties":false,"required":["phone","agent_id"]}},{"name":"set_application_dnc_status","description":"Set an application's dnc_status directly (clear | do_not_contact | do_not_call | do_not_text | do_not_email) so record, resolver, and audit agree; mirrors call-blocking states to dnc_list; logs a DNC_STATUS_CHANGED event; never changes the business status","scope":"write:dnc","schema":{"type":"object","properties":{"application_id":{"type":"string"},"dnc_status":{"type":"string","enum":["clear","do_not_contact","do_not_call","do_not_text","do_not_email"]},"reason":{"type":"string"},"source":{"type":"string"},"author":{"type":"string"},"metadata":{"type":"object","additionalProperties":{}}},"additionalProperties":false,"required":["application_id","dnc_status"]}},{"name":"resolve_case","description":"Resolve any of application_id/policy_number/phone/email/name/conversation_id to one joined case: contact, conversation, application, policy, consent (DNC), status, confidence + blockers[]. Recommended first call for a client.","scope":"read:applications","schema":{"type":"object","properties":{"phone":{"type":"string"},"email":{"type":"string"},"name":{"type":"string"},"conversation_id":{"type":"string"},"application_id":{"type":"string"},"policy_number":{"type":"string"},"contact_id":{"type":"string","description":"Deprecated GoHighLevel id; ignored"},"format":{"type":"string","enum":["full","handoff"]}},"additionalProperties":false}},{"name":"get_application_timeline","description":"Unified activity timeline for one application (messages, conservation, events, audit) + compact NL digest for grounding","scope":"read:applications","schema":{"type":"object","properties":{"application_id":{"type":"string"}},"additionalProperties":false,"required":["application_id"]}},{"name":"list_pending_client_drafts","description":"Pending AI-drafted client messages awaiting approval (welcome email + replies; legacy SMS drafts are never sent) — the onboarding queue; READ-ONLY (does not send). Filter by application_id, agent_id, or trigger","scope":"read:applications","schema":{"type":"object","properties":{"agent_id":{"type":"string"},"application_id":{"type":"string"},"trigger":{"type":"string","description":"new_application_sms | new_application_email"},"limit":{"type":"number"}},"additionalProperties":false}},{"name":"create_application","description":"Insert a new agent_application","scope":"write:applications","schema":{"type":"object","properties":{"agent_id":{"type":"string"},"proposed_insured":{"type":"string"},"client_phone_number":{"type":"string"},"date_of_birth":{"type":"string","description":"YYYY-MM-DD, required"},"carrier":{"type":"string"},"product":{"type":"string"},"monthly_premium":{"type":"number"},"policy_number":{"type":"string"},"client_email":{"type":"string"},"coverage_amount":{"type":"number"},"status":{"type":"string"},"primary_beneficiary":{"type":"string"},"effective_policy_date":{"type":"string"}},"additionalProperties":false,"required":["agent_id","proposed_insured","client_phone_number","date_of_birth","carrier","product","monthly_premium","policy_number"]}},{"name":"update_application_status","description":"Set status and/or payment notes. A downgrading status for a client in force on another policy or carrier is rejected (blocked_cross_carrier_active); admin-only override_cross_carrier_guard + override_reason, audited","scope":"write:applications","schema":{"type":"object","properties":{"application_id":{"type":"string"},"status":{"type":"string"},"payment_notes":{"type":"string"},"override_cross_carrier_guard":{"type":"boolean","description":"Admin only. Write a downgrading status even though the same client is in force elsewhere. Requires override_reason; written to event_log as CROSS_CARRIER_GUARD_OVERRIDE"},"override_reason":{"type":"string","description":"Required with override_cross_carrier_guard (min 10 chars)"}},"additionalProperties":false,"required":["application_id"]}},{"name":"update_application","description":"Partial update of client, medical, and policy fields on an application (only provided fields change; at least one is required besides application_id). Excludes recording_url (use PATCH /api/v1/applications) and ap (auto-derived). Returns the full updated record.","scope":"write:applications","schema":{"type":"object","properties":{"application_id":{"type":"string"},"client_state":{"type":"string"},"client_email":{"type":"string"},"date_of_birth":{"type":"string","description":"YYYY-MM-DD"},"gender":{"type":"string"},"height_feet":{"type":"number"},"height_inches":{"type":"number"},"weight_lbs":{"type":"number"},"tobacco_nicotine_use":{"type":"boolean"},"medical_lung_disease":{"type":"boolean"},"medical_heart_attack":{"type":"boolean"},"medical_heart_failure":{"type":"boolean"},"medical_blood_clots":{"type":"boolean"},"medical_cancer":{"type":"boolean"},"medical_diabetes":{"type":"boolean"},"medical_high_bp":{"type":"boolean"},"medical_high_cholesterol":{"type":"boolean"},"policy_number":{"type":"string"},"effective_policy_date":{"type":"string","description":"YYYY-MM-DD"},"policy_submit_date":{"type":"string","description":"YYYY-MM-DD"},"coverage_amount":{"type":"number"},"monthly_premium":{"type":"number","description":"Must be > 0, DB trigger enforced"},"primary_beneficiary":{"type":"string"},"relationship_to_insured":{"type":"string"},"lead_source":{"type":"string"},"ai_summary":{"type":"string"},"ai_transcript":{"type":"string"}},"additionalProperties":false,"required":["application_id"]}},{"name":"submit_client_draft","description":"File an approval-pending client-reply EMAIL draft (client SMS is off; sent to the email on the application) for a human to approve and send; does NOT send. Used by the CS agent on inbound client messages","scope":"write:conversations","schema":{"type":"object","properties":{"inbound_message_id":{"type":"string"},"draft_text":{"type":"string"},"application_id":{"type":"string"},"ghl_contact_id":{"type":"string","description":"Deprecated GoHighLevel id; ignored"},"agent_id":{"type":"string"},"message_type":{"type":"string"},"confidence_score":{"type":"number"},"contact_name":{"type":"string"},"contact_phone":{"type":"string"},"conversation_id":{"type":"string"}},"additionalProperties":false,"required":["inbound_message_id","draft_text","application_id"]}},{"name":"list_agents","description":"Agents you can see: yourself and your downline (full-access admin keys: your whole organization), with name, email and role","scope":"read:profile","schema":{"type":"object","properties":{"role":{"type":"string","enum":["agent","manager","admin"]}},"additionalProperties":false}},{"name":"get_agent_performance","description":"Aggregated agent performance metrics","scope":"read:analytics","schema":{"type":"object","properties":{"agent_id":{"type":"string"},"from_date":{"type":"string","description":"YYYY-MM-DD"},"to_date":{"type":"string","description":"YYYY-MM-DD"}},"additionalProperties":false}},{"name":"get_analytics_report","description":"Full book-of-business analytics report (production, book health, persistency cohorts, economics, conservation, carrier/tier/lead-source/product mix, leaderboard, trend) — same data as /manager and /agent analytics pages","scope":"read:analytics","schema":{"type":"object","properties":{"agent_id":{"type":"string"}},"additionalProperties":false,"required":["agent_id"]}},{"name":"get_agent_talk_wait_metrics","description":"Talk/wait metrics from warm_transfer_requests (human) and Retell call history (AI), for a date window","scope":"read:analytics","schema":{"type":"object","properties":{"from_date":{"type":"string","description":"YYYY-MM-DD, defaults to today midnight UTC"},"to_date":{"type":"string","description":"YYYY-MM-DD, defaults to today"},"agent_type":{"type":"string","enum":["human","ai","all"]}},"additionalProperties":false}},{"name":"get_human_agent_availability","description":"Live human-agent availability, sorted by longest-waiting first","scope":"read:profile","schema":{"type":"object","properties":{"status":{"type":"string","description":"online | offline | busy | break — omit for all"}},"additionalProperties":false}},{"name":"get_optimal_transfer_target","description":"Pick the best available human agent for a live transfer, based on state licensing + FIFO fairness","scope":"read:profile","schema":{"type":"object","properties":{"caller_state":{"type":"string","description":"2-letter US state code, e.g. TX, CA, FL"},"agent_type_preference":{"type":"string","enum":["human","ai","any"],"description":"default: human"},"override_state":{"type":"string"}},"additionalProperties":false,"required":["caller_state"]}},{"name":"list_commissions","description":"Commission book as the Finance page shows it: booked, paid, pending per agent, the back-end forecast, and optionally each policy. One agent, a manager team, or the whole agency","scope":"read:commissions","schema":{"type":"object","properties":{"agent_id":{"type":"string"},"team_manager_id":{"type":"string","description":"a manager plus their direct team"},"from_date":{"type":"string","description":"policy submit date, YYYY-MM-DD"},"to_date":{"type":"string","description":"YYYY-MM-DD"},"include_policies":{"type":"boolean"},"policy_limit":{"type":"number","description":"default 100, max 500"}},"additionalProperties":false}},{"name":"update_commission_status","description":"Update commission status/payment details on an application (Paid/Pending/Partial/Not Applicable). At least one of commission_status, commission_amount, or commission_payment_reference is required","scope":"write:commissions","schema":{"type":"object","properties":{"application_id":{"type":"string"},"commission_status":{"type":"string"},"commission_paid_date":{"type":"string","description":"YYYY-MM-DD"},"commission_amount":{"type":"number"},"commission_payment_reference":{"type":"string"}},"additionalProperties":false,"required":["application_id"]}},{"name":"get_revenue_summary","description":"Premium (AP) and commission totals grouped by status, carrier, agent or month. Commission is the split-adjusted amount the Finance page shows","scope":"read:reports","schema":{"type":"object","properties":{"from_date":{"type":"string","description":"YYYY-MM-DD"},"to_date":{"type":"string","description":"YYYY-MM-DD"},"agent_id":{"type":"string"},"group_by":{"type":"string","enum":["status","carrier","agent","month"],"description":"default: status"}},"additionalProperties":false}},{"name":"check_kill_switches","description":"Show current kill-switch state","scope":"admin:kill_switches","schema":{"type":"object","properties":{},"additionalProperties":false}},{"name":"toggle_kill_switch","description":"Enable/disable a named kill switch (admin). Requires a reason of at least 10 characters","scope":"admin:kill_switches","schema":{"type":"object","properties":{"switch_name":{"type":"string"},"active":{"type":"boolean"},"reason":{"type":"string"}},"additionalProperties":false,"required":["switch_name","active","reason"]}},{"name":"get_ai_concurrency_status","description":"Show Retell concurrency cap + current utilization","scope":"read:system","schema":{"type":"object","properties":{},"additionalProperties":false}},{"name":"set_ai_concurrency_limit","description":"Update Retell concurrency cap (admin)","scope":"admin:ai_concurrency","schema":{"type":"object","properties":{"new_limit":{"type":"number"}},"additionalProperties":false,"required":["new_limit"]}},{"name":"get_system_health","description":"Health check across LegacyCore + downstream APIs","scope":"read:system","schema":{"type":"object","properties":{},"additionalProperties":false}},{"name":"get_live_ai_calls","description":"Retell AI calls in progress right now (real-time snapshot); for historical calls use list_retell_calls","scope":"read:calls","schema":{"type":"object","properties":{},"additionalProperties":false}},{"name":"list_retell_calls","description":"List Retell AI voice-agent calls; for in-progress calls use get_live_ai_calls","scope":"read:calls","schema":{"type":"object","properties":{"agent_id":{"type":"string"},"call_status":{"type":"string","description":"ended | ongoing | error | not_connected"},"from_date":{"type":"string","description":"YYYY-MM-DD"},"to_date":{"type":"string","description":"YYYY-MM-DD"},"limit":{"type":"number"}},"additionalProperties":false}},{"name":"get_retell_call","description":"Get one Retell call","scope":"read:calls","schema":{"type":"object","properties":{"call_id":{"type":"string"}},"additionalProperties":false,"required":["call_id"]}},{"name":"list_retell_agents","description":"List Retell agents","scope":"read:calls","schema":{"type":"object","properties":{},"additionalProperties":false}},{"name":"retry_call_transcription","description":"Re-run transcription + AI summary for an application's call recording (handles long/large audio); idempotent, skips if already done unless force=true","scope":"write:applications","schema":{"type":"object","properties":{"application_id":{"type":"string"},"force":{"type":"boolean"}},"additionalProperties":false,"required":["application_id"]}},{"name":"get_call_transcript","description":"Get the stored verbatim call transcript for an application; returns has_transcript=false with guidance if not transcribed yet","scope":"read:applications","schema":{"type":"object","properties":{"application_id":{"type":"string"}},"additionalProperties":false,"required":["application_id"]}},{"name":"get_call_summary","description":"Get the stored AI call summary + score for an application; returns has_summary=false with guidance if not generated yet","scope":"read:applications","schema":{"type":"object","properties":{"application_id":{"type":"string"}},"additionalProperties":false,"required":["application_id"]}},{"name":"get_policy_summary","description":"Get the stored, data-derived policy summary for an application — a clean breakdown (name, carrier, product, premium, face amount, status, beneficiary, contact) built from this row, not a call transcript; use when get_call_summary has no recording to work from","scope":"read:applications","schema":{"type":"object","properties":{"application_id":{"type":"string"}},"additionalProperties":false,"required":["application_id"]}},{"name":"check_dnc_status","description":"Fast single-phone DNC + national-registry check; for a full compliance verdict (DNC + consent + history) use investigate_phone","scope":"read:compliance","schema":{"type":"object","properties":{"phone":{"type":"string"}},"additionalProperties":false,"required":["phone"]}},{"name":"add_to_dnc","description":"Add phone to DNC list (write — TCPA-sensitive). Requires a reason","scope":"write:dnc","schema":{"type":"object","properties":{"phone":{"type":"string"},"reason":{"type":"string"}},"additionalProperties":false,"required":["phone","reason"]}},{"name":"get_dnc_audit","description":"Bulk cross-ref of ALL applications against the DNC list; for one phone use investigate_phone","scope":"read:compliance","schema":{"type":"object","properties":{"agent_id":{"type":"string","description":"Restrict the audit to one agent"},"include_all_on_dnc":{"type":"boolean","description":"Include every status match, not just protected_clients/blocked_leads"}},"additionalProperties":false}},{"name":"get_compliance_log","description":"Raw TCPA consent records by phone/date; for a verdict on one phone use investigate_phone","scope":"read:compliance","schema":{"type":"object","properties":{"phone":{"type":"string"},"from_date":{"type":"string","description":"YYYY-MM-DD"},"to_date":{"type":"string","description":"YYYY-MM-DD"},"limit":{"type":"number"}},"additionalProperties":false}},{"name":"list_compliance_violations","description":"Bulk rollup of TCPA/DNC/kill-switch incidents across the book; for one phone use investigate_phone","scope":"read:compliance","schema":{"type":"object","properties":{"since":{"type":"string","description":"ISO timestamp, default: last 7 days"},"severity_min":{"type":"string","enum":["info","warning","critical"]},"limit":{"type":"number"}},"additionalProperties":false}},{"name":"list_at_risk_policies","description":"Conservation-actionable policies (unpaid / pending-first-payment / lapsed / needs-attention, dead ones excluded), each with a risk_reason + payment evidence; for pipeline stage + next action use get_conservation_queue","scope":"read:applications","schema":{"type":"object","properties":{"agent_id":{"type":"string"},"limit":{"type":"number"}},"additionalProperties":false}},{"name":"trigger_conservation","description":"Kick off conservation outreach for one application. Requires a reason","scope":"write:conservation","schema":{"type":"object","properties":{"application_id":{"type":"string"},"reason":{"type":"string"}},"additionalProperties":false,"required":["application_id","reason"]}},{"name":"get_conservation_queue","description":"Per-policy conservation pipeline — last outreach stage, matched rule, next action; for the plain at-risk list use list_at_risk_policies","scope":"read:applications","schema":{"type":"object","properties":{"stage":{"type":"string","description":"e.g. outreach_sent, resolved"},"since":{"type":"string","description":"ISO timestamp, default: last 30 days"},"limit":{"type":"number"}},"additionalProperties":false}},{"name":"get_billing_status","description":"Stripe subscription status across all customers","scope":"read:billing","schema":{"type":"object","properties":{"status":{"type":"string","description":"active | past_due | canceled | trialing | incomplete | unpaid — default: all"},"limit":{"type":"number","description":"default 10"}},"additionalProperties":false}},{"name":"list_failed_payments","description":"Recent Stripe failed payments","scope":"read:billing","schema":{"type":"object","properties":{"limit":{"type":"number"}},"additionalProperties":false}},{"name":"get_daily_report","description":"Daily production summary (demo-filtered)","scope":"read:reports","schema":{"type":"object","properties":{"date":{"type":"string"}},"additionalProperties":false}},{"name":"get_nemoclaw_submission_queue","description":"Carrier submission queue across the agency: portal-worker eApp jobs (open by default), counts per status, and how many workers are online. Client shown as first name + last initial","scope":"read:submission_queue","schema":{"type":"object","properties":{"agent_id":{"type":"string"},"status_filter":{"type":"string","description":"open (default), all, or one job status"},"limit":{"type":"number","description":"default 50, max 200"}},"additionalProperties":false}},{"name":"check_profit_first_qualification","description":"Check profit-first qualification (age >= 50 + checking acct)","scope":"read:qualification","schema":{"type":"object","properties":{"user_age":{"type":"number"},"user_has_checking_account":{"type":"boolean"}},"additionalProperties":false,"required":["user_age","user_has_checking_account"]}},{"name":"query_event_log","description":"Query the immutable event log","scope":"read:audit","schema":{"type":"object","properties":{"event_type":{"type":"string"},"entity_type":{"type":"string"},"entity_id":{"type":"string"},"actor_type":{"type":"string","enum":["user","ai_agent","system","webhook","cron"]},"since":{"type":"string","description":"ISO timestamp lower bound, inclusive"},"until":{"type":"string","description":"ISO timestamp upper bound, exclusive"},"limit":{"type":"number","description":"default 100, cap 500"}},"additionalProperties":false}},{"name":"create_notification","description":"CANONICAL notification tool for external agents: creates an in-app bell notification AND fans out to web push in one call","scope":"write:notifications","schema":{"type":"object","properties":{"user_id":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"},"type":{"type":"string","enum":["success","info","warning","error"]},"category":{"type":"string","enum":["general","application","commission","system","reminder"]},"action_url":{"type":"string"},"action_label":{"type":"string"},"metadata":{"type":"object","additionalProperties":{}},"push":{"type":"boolean"}},"additionalProperties":false,"required":["user_id","title"]}},{"name":"get_hermes_status","description":"Hermes Conservation CS heartbeat status (ONLINE/STALE/OFFLINE) + queue depth + self-checks","scope":"read:system","schema":{"type":"object","properties":{},"additionalProperties":false}},{"name":"get_policy_summary_status","description":"Check whether the policy-summary PDF for an application is ready","scope":"read:applications","schema":{"type":"object","properties":{"application_id":{"type":"string"}},"additionalProperties":false,"required":["application_id"]}},{"name":"list_api_key_calls","description":"Audit-log query against api_keys_private.api_key_usage_logs (filter by api_key_id/prefix/tool_name/window; group_by=tool|status|none)","scope":"read:audit","schema":{"type":"object","properties":{"api_key_id":{"type":"string"},"api_key_prefix":{"type":"string"},"tool_name":{"type":"string"},"since":{"type":"string"},"until":{"type":"string"},"status_code":{"type":"number"},"limit":{"type":"number"},"group_by":{"type":"string","enum":["tool","status","none"]}},"additionalProperties":false}},{"name":"investigate_phone","description":"Compliance investigator: single-call join of DNC + compliance log + event log + applications + call history. Returns verdict.","scope":"read:compliance","schema":{"type":"object","properties":{"phone":{"type":"string"},"application_id":{"type":"string"},"lookback_days":{"type":"number"}},"additionalProperties":false}},{"name":"carrier_sync_open_session","description":"Open a durable carrier-sync run BEFORE portal extraction. Returns run_id, portal URL, mapping version and whether the carrier has any status mappings yet","scope":"write:carrier_sync","schema":{"type":"object","properties":{"agent_id":{"type":"string","description":"Agent UUID that owns the run — always agent-scoped"},"carrier":{"type":"string","description":"Carrier slug, e.g. americo | mutual-of-omaha | ethos | corebridge | transamerica"},"sync_type":{"type":"string","enum":["manual","scheduled","interactive","verification"]},"dry_run_default":{"type":"boolean"}},"additionalProperties":false,"required":["agent_id","carrier"]}},{"name":"carrier_sync_validate_rows","description":"Shape-check extracted portal rows before ingest: missing fields, duplicate policy numbers, bad premium shapes, absent raw_data, prompt-injection-looking text. Writes nothing","scope":"read:carriers","schema":{"type":"object","properties":{"agent_id":{"type":"string"},"run_id":{"type":"string"},"carrier":{"type":"string"},"rows":{"type":"unknown","_zodTypeName":"ZodUnion","description":"Verbatim extracted rows: an array, or a JSON string of that array. Required unless rows_url is given; see carrier_sync_get_update_capabilities for the contract"},"rows_url":{"type":"string","description":"Instead of rows: an https URL returning the JSON array. Only the LegacyCore host or a Supabase Storage signed URL (/storage/v1/object/sign/...) is accepted"}},"additionalProperties":false,"required":["agent_id","run_id","carrier"]}},{"name":"carrier_sync_match_rows","description":"Preview row matching. Key: normalized policy number within agent_id, then client name + effective date; 2+ candidates = ambiguous. Writes nothing. The cross-carrier guard later matches the client by name + DOB, else name + phone","scope":"read:carriers","schema":{"type":"object","properties":{"agent_id":{"type":"string"},"run_id":{"type":"string"},"carrier":{"type":"string"},"rows":{"type":"unknown","_zodTypeName":"ZodUnion","description":"Verbatim extracted rows: an array, or a JSON string of that array. Required unless rows_url is given; see carrier_sync_get_update_capabilities for the contract"},"rows_url":{"type":"string","description":"Instead of rows: an https URL returning the JSON array. Only the LegacyCore host or a Supabase Storage signed URL (/storage/v1/object/sign/...) is accepted"}},"additionalProperties":false,"required":["agent_id","run_id","carrier"]}},{"name":"carrier_sync_dry_run","description":"Full update plan with per-row diffs; writes NOTHING to applications. Leaves the run open: status dry_run_completed, ingest_rows works on the same run_id. Cross-carrier guard blocks show as blocked_cross_carrier_active","scope":"write:carrier_sync","schema":{"type":"object","properties":{"agent_id":{"type":"string"},"run_id":{"type":"string"},"carrier":{"type":"string"},"rows":{"type":"unknown","_zodTypeName":"ZodUnion","description":"Verbatim extracted rows: an array, or a JSON string of that array. Required unless rows_url is given; see carrier_sync_get_update_capabilities for the contract"},"rows_url":{"type":"string","description":"Instead of rows: an https URL returning the JSON array. Only the LegacyCore host or a Supabase Storage signed URL (/storage/v1/object/sign/...) is accepted"},"extract":{"type":"unknown","_zodTypeName":"ZodObject","description":"How complete the portal read was ({ complete, audit: [{ source, rows, visibly_empty, empty_confirmed, error }] }). Falls back to the run extract_summary evidence. An incomplete read is refused: no status is proposed or written"},"approved_fields":{"type":"array","items":{"type":"string","enum":["effective_policy_date","policy_submit_date","coverage_amount"]},"description":"Carrier-owned fields to write after reviewing the dry-run diff (from row effective_date, submit_date, face_amount). Unlisted ones come back in fields_awaiting_approval"},"allow_unmapped_statuses":{"type":"boolean"}},"additionalProperties":false,"required":["agent_id","run_id","carrier"]}},{"name":"carrier_sync_ingest_rows","description":"The single live-write path. Never writes ambiguous, unmatched or unmapped rows, nor a downgrade (declined/cancelled/lapsed...) for a client in force on another policy or carrier: blocked_cross_carrier_active, counted in the summary","scope":"write:applications","schema":{"type":"object","properties":{"agent_id":{"type":"string"},"run_id":{"type":"string"},"carrier":{"type":"string"},"rows":{"type":"unknown","_zodTypeName":"ZodUnion","description":"Verbatim extracted rows: an array, or a JSON string of that array. Required unless rows_url is given; see carrier_sync_get_update_capabilities for the contract"},"rows_url":{"type":"string","description":"Instead of rows: an https URL returning the JSON array. Only the LegacyCore host or a Supabase Storage signed URL (/storage/v1/object/sign/...) is accepted"},"extract":{"type":"unknown","_zodTypeName":"ZodObject","description":"How complete the portal read was ({ complete, audit: [{ source, rows, visibly_empty, empty_confirmed, error }] }). Falls back to the run extract_summary evidence. An incomplete read is refused: no status is proposed or written"},"approved_fields":{"type":"array","items":{"type":"string","enum":["effective_policy_date","policy_submit_date","coverage_amount"]},"description":"Carrier-owned fields to write after reviewing the dry-run diff (from row effective_date, submit_date, face_amount). Unlisted ones come back in fields_awaiting_approval"},"dry_run":{"type":"boolean"},"allow_unmapped_statuses":{"type":"boolean","description":"Default false. True still refuses to write status/policy_health for unmapped statuses"}},"additionalProperties":false,"required":["agent_id","run_id","carrier"]}},{"name":"carrier_sync_create_missing_applications","description":"Reviewed create: adds applications for policy numbers you pick from one run's unmatched_policies, for that run's agent only. Missing DOB or premium saves as draft. Idempotent per run + policy","scope":"write:applications","schema":{"type":"object","properties":{"agent_id":{"type":"string"},"run_id":{"type":"string"},"carrier":{"type":"string"},"policy_numbers":{"type":"unknown","_zodTypeName":"ZodUnion","description":"Policy numbers from this run's unmatched_policies (array, or a JSON string of one); up to 200. Anything else is reported and ignored"}},"additionalProperties":false,"required":["agent_id","run_id","carrier","policy_numbers"]}},{"name":"carrier_sync_get_run","description":"Full state of one sync run: ledger, per-row decisions, evidence, reconciled counts. The recovery path when a worker process dies mid-run","scope":"read:carriers","schema":{"type":"object","properties":{"agent_id":{"type":"string"},"run_id":{"type":"string"}},"additionalProperties":false,"required":["agent_id","run_id"]}},{"name":"carrier_sync_list_recent_runs","description":"Recent carrier-sync runs, newest first — answers \"did this carrier already sync today?\" before opening a duplicate run","scope":"read:carriers","schema":{"type":"object","properties":{"agent_id":{"type":"string"},"carrier":{"type":"string"},"limit":{"type":"number"}},"additionalProperties":false,"required":["agent_id"]}},{"name":"carrier_sync_list_configs","description":"Configured carriers with portal URL, enabled state, alias list, status-mapping count and versions. Read before syncing all carriers","scope":"read:carriers","schema":{"type":"object","properties":{"agent_id":{"type":"string"},"enabled_only":{"type":"boolean"}},"additionalProperties":false,"required":["agent_id"]}},{"name":"carrier_sync_upsert_status_mapping","description":"Map a newly discovered raw carrier status to a canonical LegacyCore status. Elevated: agency-wide config, audited, rejects non-canonical targets","scope":"write:carriers","schema":{"type":"object","properties":{"agent_id":{"type":"string"},"carrier":{"type":"string"},"raw_status":{"type":"string","description":"Verbatim portal status string as reported in unmapped_statuses"},"mapped_status":{"type":"string","description":"Canonical LifecycleStatus, e.g. Active | Lapse Pending | Cancelled"},"notes":{"type":"string"}},"additionalProperties":false,"required":["agent_id","carrier","raw_status","mapped_status"]}},{"name":"carrier_sync_attach_evidence","description":"Attach evidence to a sync run — screenshot reference, phase timing, blocker context, extract summary or portal URL. Stored as data, never interpreted","scope":"write:carrier_sync","schema":{"type":"object","properties":{"agent_id":{"type":"string"},"run_id":{"type":"string"},"evidence_type":{"type":"string","enum":["screenshot","timing","blocker","extract_summary","portal_url","note"]},"label":{"type":"string"},"value":{"type":"object","additionalProperties":{}}},"additionalProperties":false,"required":["agent_id","run_id","evidence_type"]}},{"name":"carrier_sync_get_update_capabilities","description":"Exactly which application columns the sync engine may write, which it will not, and why. The authoritative field contract for portal sync","scope":"read:carriers","schema":{"type":"object","properties":{"carrier":{"type":"string"}},"additionalProperties":false}},{"name":"carrier_sync_run_all_plan","description":"Backend-approved plan for syncing every configured carrier: run order, recommended mode, and per-carrier blockers. Runs no browser automation","scope":"read:carriers","schema":{"type":"object","properties":{"agent_id":{"type":"string"},"only_enabled":{"type":"boolean"}},"additionalProperties":false,"required":["agent_id"]}},{"name":"carrier_2fa_get_code","description":"SENSITIVE: read a live carrier 2FA code from the agent's connected mailbox, ignoring anything older than requested_after. retry=false means the setup is broken and polling will never help","scope":"read:carrier_2fa","schema":{"type":"object","properties":{"agent_id":{"type":"string"},"carrier":{"type":"string"},"requested_after":{"type":"string","description":"ISO-8601 timestamp; codes older than this are ignored as stale"}},"additionalProperties":false,"required":["agent_id","carrier","requested_after"]}},{"name":"portal_worker_status","description":"Is the portal worker for this agent online? The portal worker is the local runner on the agent computer that fills carrier eApps. Lists each paired worker with its last-seen time and expected carriers. Contains no client data","scope":"read:applications","schema":{"type":"object","properties":{"agent_id":{"type":"string"}},"additionalProperties":false,"required":["agent_id"]}},{"name":"portal_worker_list_jobs","description":"Carrier eApp jobs sent from the Portal Worker page, newest first, each with its latest progress step. Client shown as first name + last initial only; no SSN, DOB or address","scope":"read:applications","schema":{"type":"object","properties":{"agent_id":{"type":"string"},"status":{"type":"string","enum":["queued","claimed","awaiting_code","awaiting_part_two","needs_attention","completed","failed","cancelled"]},"limit":{"type":"number"}},"additionalProperties":false,"required":["agent_id"]}},{"name":"portal_worker_get_job_progress","description":"Every progress step of one portal-worker job (picked up, signed in, page filled, needs you, handed off), plus whether its worker is online. Pass after_seq to get only new steps","scope":"read:applications","schema":{"type":"object","properties":{"agent_id":{"type":"string"},"job_id":{"type":"string"},"after_seq":{"type":"number"}},"additionalProperties":false,"required":["agent_id","job_id"]}},{"name":"portal_worker_recover_job","description":"Cancel or retry one portal-worker eApp job. Retry needs carrier_outcome not_submitted (the agent confirmed nothing reached the carrier); cancel wipes the stored SSNs","scope":"write:applications","schema":{"type":"object","properties":{"agent_id":{"type":"string"},"job_id":{"type":"string"},"action":{"type":"string","enum":["cancel","retry"]},"carrier_outcome":{"type":"string","enum":["not_submitted","submitted","unknown"],"description":"default unknown"}},"additionalProperties":false,"required":["agent_id","job_id","action"]}},{"name":"get_policy_payments","description":"Monthly premium payments recorded for one policy or every policy in the agent book (PAID, MISSED, PENDING, NSF, WAIVED per month)","scope":"read:applications","schema":{"type":"object","properties":{"agent_id":{"type":"string"},"application_id":{"type":"string"}},"additionalProperties":false,"required":["agent_id"]}},{"name":"update_policy_payment","description":"Record one month of a client premium payment (PAID, MISSED, PENDING, NSF, WAIVED). Same write and audit trail as the payment grid; month 1 also sets the policy paid status","scope":"write:applications","schema":{"type":"object","properties":{"agent_id":{"type":"string"},"application_id":{"type":"string"},"month_number":{"type":"number"},"status":{"type":"string","enum":["PAID","MISSED","PENDING","NSF","WAIVED"]},"payment_date":{"type":"string","description":"YYYY-MM-DD"},"reason":{"type":"string"}},"additionalProperties":false,"required":["agent_id","application_id","month_number","status"]}},{"name":"list_referrals","description":"Referral contacts harvested from the agent clients (beneficiaries and family), newest first, with counts per status","scope":"read:crm","schema":{"type":"object","properties":{"agent_id":{"type":"string"},"status":{"type":"string"},"limit":{"type":"number","description":"default 50, max 200"}},"additionalProperties":false,"required":["agent_id"]}},{"name":"harvest_referrals","description":"Pull referral contacts (beneficiary name, phone, relationship) from one active policy into the referral list. Never contacts anyone","scope":"write:applications","schema":{"type":"object","properties":{"agent_id":{"type":"string"},"application_id":{"type":"string"}},"additionalProperties":false,"required":["agent_id","application_id"]}},{"name":"list_letters","description":"Handwritten letters sent to the agent clients through Handwrytten, newest first, with status and how each was paid for","scope":"read:crm","schema":{"type":"object","properties":{"agent_id":{"type":"string"},"limit":{"type":"number","description":"default 50, max 200"}},"additionalProperties":false,"required":["agent_id"]}},{"name":"get_earnings_statement","description":"Yearly earnings statement as the Tax Center builds it: gross paid, pending, chargebacks, net, by quarter and month","scope":"read:commissions","schema":{"type":"object","properties":{"agent_id":{"type":"string"},"year":{"type":"number","description":"default: latest year with earnings"}},"additionalProperties":false,"required":["agent_id"]}},{"name":"get_wallet","description":"Agent wallet balance (pays for voice minutes, letters, avatar videos) and its latest transactions","scope":"read:billing","schema":{"type":"object","properties":{"agent_id":{"type":"string"},"limit":{"type":"number","description":"transactions, default 20, max 100"}},"additionalProperties":false,"required":["agent_id"]}},{"name":"get_goals","description":"Production goals: the agent personal monthly, quarterly and yearly targets with actuals, plus team goals when the agent is a manager","scope":"read:analytics","schema":{"type":"object","properties":{"agent_id":{"type":"string"}},"additionalProperties":false,"required":["agent_id"]}},{"name":"list_voice_calls","description":"Recent calls handled by the agent voice agents (xAI Grok voice, Retell, ElevenLabs): status, duration, cost, summary. Caller shown as last four digits","scope":"read:calls","schema":{"type":"object","properties":{"agent_id":{"type":"string"},"provider":{"type":"string","enum":["all","xai","elevenlabs","retell"]},"limit":{"type":"number","description":"default 25, max 100"}},"additionalProperties":false,"required":["agent_id"]}},{"name":"list_live_call_sessions","description":"Live Call Co-Pilot sessions the agent ran on their own calls: when, how long, and whether one is active now","scope":"read:calls","schema":{"type":"object","properties":{"agent_id":{"type":"string"},"limit":{"type":"number","description":"default 20, max 100"}},"additionalProperties":false,"required":["agent_id"]}},{"name":"list_funnel_leads","description":"Leads assigned to the agent in the lead funnel with their stage and score, counts per stage. Client shown as first name + last initial","scope":"read:crm","schema":{"type":"object","properties":{"agent_id":{"type":"string"},"stage":{"type":"string"},"limit":{"type":"number","description":"default 50, max 200"}},"additionalProperties":false,"required":["agent_id"]}},{"name":"get_coaching_insights","description":"SI coaching reviews of the agent calls: performance score, strengths, improvement areas and suggestions, newest first","scope":"read:analytics","schema":{"type":"object","properties":{"agent_id":{"type":"string"},"limit":{"type":"number","description":"default 10, max 50"}},"additionalProperties":false,"required":["agent_id"]}},{"name":"get_calendar_events","description":"Upcoming events on the agent connected Google Calendar for the next N days (default 14). Fails with calendar_not_connected if they never connected it","scope":"read:crm","schema":{"type":"object","properties":{"agent_id":{"type":"string"},"days":{"type":"number","description":"1-60, default 14"}},"additionalProperties":false,"required":["agent_id"]}},{"name":"create_follow_up_event","description":"Book a client follow-up on the agent Google Calendar (\"Follow-up: client name\", carrier, product, phone, notes)","scope":"write:applications","schema":{"type":"object","properties":{"agent_id":{"type":"string"},"application_id":{"type":"string"},"start_time":{"type":"string","description":"ISO date-time with offset"},"duration_minutes":{"type":"number","description":"default 30, max 480"},"notes":{"type":"string"}},"additionalProperties":false,"required":["agent_id","application_id","start_time"]}},{"name":"list_access_sessions","description":"Context-aware access: sign-in sessions seen in the last N hours with risk scores, and every non-allow decision (step-up, block). Agency-wide, full-access keys only","scope":"read:audit","schema":{"type":"object","properties":{"hours":{"type":"number","description":"default 168, max 720"},"user_id":{"type":"string"},"limit":{"type":"number","description":"default 50, max 200"}},"additionalProperties":false}},{"name":"list_demo_bookings","description":"Prospect demo bookings from the public site: upcoming by default, with agency, size, qualification and source. Full-access keys only","scope":"admin:organization","schema":{"type":"object","properties":{"upcoming_only":{"type":"boolean","description":"default true"},"status":{"type":"string"},"limit":{"type":"number","description":"default 50, max 200"}},"additionalProperties":false}},{"name":"list_avatar_videos","description":"The agent My Avatar videos: purpose, status, length and credits used, newest first","scope":"read:profile","schema":{"type":"object","properties":{"agent_id":{"type":"string"},"limit":{"type":"number","description":"default 25, max 100"}},"additionalProperties":false,"required":["agent_id"]}},{"name":"social_list_channels","description":"Social accounts connected in the agent Postiz workspace (id, name, network). Call before social_create_post to get channel ids","scope":"read:crm","schema":{"type":"object","properties":{"agent_id":{"type":"string"}},"additionalProperties":false,"required":["agent_id"]}},{"name":"social_check_post","description":"Checks post text for insurance advertising red flags (guaranteed approval, free coverage, government program, carrier names). Run before posting","scope":"read:crm","schema":{"type":"object","properties":{"agent_id":{"type":"string"},"content":{"type":"string"}},"additionalProperties":false,"required":["agent_id","content"]}},{"name":"social_create_post","description":"Posts to the agent social channels through their Postiz workspace: type draft (default, agent reviews in Postiz), schedule (needs scheduled_for, ISO time) or now. Logged on the agent Social page","scope":"write:conversations","schema":{"type":"object","properties":{"agent_id":{"type":"string"},"channel_ids":{"type":"array","items":{"type":"string"},"description":"ids from social_list_channels"},"content":{"type":"string","description":"post text, up to 5000 characters"},"type":{"type":"string","enum":["draft","schedule","now"],"description":"default draft"},"scheduled_for":{"type":"string","description":"ISO 8601 time, required for schedule"},"media_urls":{"type":"array","items":{"type":"string"},"description":"up to 4 public https image or mp4 links"}},"additionalProperties":false,"required":["agent_id","channel_ids","content"]}},{"name":"social_list_posts","description":"The agent social post log, newest first: type, status, channels, schedule and whether it came from the app or a bot","scope":"read:crm","schema":{"type":"object","properties":{"agent_id":{"type":"string"},"limit":{"type":"number","description":"default 25, max 200"}},"additionalProperties":false,"required":["agent_id"]}},{"name":"voice_caller_policies","description":"The caller own policies (carrier, product, status, premium, draft day) with a sentence to say. If it returns needs_verification, ask for the date of birth and call again with it","scope":"read:crm","schema":{"type":"object","properties":{"agent_id":{"type":"string","description":"injected on a voice call token"},"caller_phone":{"type":"string","description":"injected on a voice call token"},"date_of_birth":{"type":"string","description":"as the caller said it; needed when the number is not carrier-verified"},"policy_number":{"type":"string","description":"alternative proof: the full policy number"}},"additionalProperties":false}},{"name":"voice_payment_status","description":"Whether the caller premium payments are up to date: first payment received, latest month, missed drafts, draft day, with a sentence to say","scope":"read:crm","schema":{"type":"object","properties":{"agent_id":{"type":"string","description":"injected on a voice call token"},"caller_phone":{"type":"string","description":"injected on a voice call token"},"date_of_birth":{"type":"string","description":"as the caller said it; needed when the number is not carrier-verified"},"policy_number":{"type":"string","description":"alternative proof: the full policy number"}},"additionalProperties":false}},{"name":"voice_check_dnc","description":"Is the caller number on the do-not-call list? Returns a sentence to say","scope":"read:crm","schema":{"type":"object","properties":{"agent_id":{"type":"string","description":"injected on a voice call token"},"caller_phone":{"type":"string","description":"injected on a voice call token"}},"additionalProperties":false}},{"name":"voice_add_to_dnc","description":"The caller asked not to be called again: add their number to the internal do-not-call list (TCPA). Use whenever a caller says stop calling","scope":"write:dnc","schema":{"type":"object","properties":{"agent_id":{"type":"string"},"caller_phone":{"type":"string"},"reason":{"type":"string"}},"additionalProperties":false}},{"name":"voice_request_callback","description":"Ask the agent to call the caller back: a bell and push notification with the reason, preferred time and a link to the policy","scope":"write:notifications","schema":{"type":"object","properties":{"agent_id":{"type":"string"},"caller_phone":{"type":"string"},"reason":{"type":"string"},"preferred_time":{"type":"string","description":"as the caller said it, e.g. tomorrow after 3"}},"additionalProperties":false}}]}