Query audience
query_audienceCount a cohort without saving anything (nothing appears in the console): run up to 10 segment rules now and get the counts (matched, opted out, eligible to text) and the first contacts. Examples: replied in the last 7 days (last_reply_at after 7d); got a batch and did not reply (batch sent, and batch replied with is_not); started checkout but never purchased (event exists, event not_exists); VIPs not texted in 30 days. Same rule fields as a saved segment. Everyone eligible to text: one rule, status is subscribed.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "query_audience"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | How many matching contacts to return | |
| match | No | all: a contact must match every rule. any: at least one rule | all |
| rules | No | Up to 10 rules that decide who matches | |
| topic_id | No | Topic id or name: eligible also removes contacts unsubscribed from it |