List segments
Segments of the shop from Messaging > Segments, with their Segment Size.
MCP tool postscript_read → list_segments
Returns the segments on the Segments page, including the default ones such as All Customers and Subscribers (INTL Included). size is the Segment Size Postscript shows; it refreshes daily for segments used in a campaign in the last 30 days and is otherwise as of the last manual refresh. Unsubscribed people are never counted. Use segment names as include_segments and exclude_segments of create_campaign.
Parameters
| Name | Type | Description |
|---|---|---|
| search string | string | Only segments whose name contains this text. |
tools/call
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "postscript_read",
"arguments": {
"operation": "list_segments",
"arguments": {}
}
}
} Example response
{
"content": [
{
"type": "text",
"text": "{ ... same JSON as structuredContent ... }"
}
],
"structuredContent": {
"segments": [
{
"segment_id": "41872",
"name": "All Customers and Subscribers (INTL Included)",
"size": 18240
},
{
"segment_id": "52310",
"name": "Subscribers with No Orders",
"size": 5127
}
]
},
"isError": false
}