List segments and tags
list_segmentsUse this when you need the real segments and tags of a project: every saved segment (with its live matching count) and every tag (with how many contacts carry it). Use it before tag_contacts, untag_contacts, create_segment or preview_segment, so you choose a real handle rather than guessing a name. Not for checking an unsaved filter (use preview_segment) or for finding people (use search_audience).
A segment's id (seg_…) is what preview_segment, create_segment's rules, and the segment argument on tag_contacts/untag_contacts all take; a tag's id (tag_…) is what those same tools' tag argument takes (or just pass its name: an unrecognised name creates a new tag on tag_contacts only). count is the live number of contacts a segment currently matches, computed fresh, never a stale cached figure.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"project": "<project>"
},
"name": "list_segments"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| project | Yes | The project handle, like `prj_…`. |