segment_leads
Organize, select, or clear a lead segment on the Leads tab by its exact source tag (e.g. 'csv:apc-cch-2024'). Validates the tag against the company's live segment tags and returns the exact-token filter plus a server-computed lead count (excluding do-not-contact, archived, and test leads). Read-only: the Leads tab applies the action; this tool changes no data and CANNOT enroll anyone. To enroll the segment, call enroll_by_segment — do not ask the operator to click Enroll or paste emails. Use when the operator wants to focus the Leads tab on one segment or event — group it, select all its leads for enrollment, or clear that selection.
Routing: CRM/sales → select or organize leads by segment/event tag → use this
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| action | Yes | 'organize' = group Leads tab by this segment; 'select' = select all leads in it; 'clear' = clear that selection. | |
| companyId | Yes | FreedomOS company id to act within (you must be a member). Required for company-scoped tools. | |
| segment_tag | Yes | Exact segment tag token from crm_leads.source, e.g. 'csv:apc-cch-2024'. No substring matching — must match a live tag exactly. |