List Customer Segment
Lists customers matching spend and/or order-count thresholds, sorted by spend or order count — for targeting or export. Computes stats live per customer rather than via a single indexed query, so it's slower than the other list abilities; narrow with role and thresholds on stores with many customers.
Also known as: top customers, repeat customers, customer groups, segments.
| Property | Value |
|---|---|
| Ability slug | mosmcp/list-customer-segment |
| Wire tool name | mosmcp__list-customer-segment |
| Category | WooCommerce (mosmcp-woocommerce) |
| Plan | Free |
Required access
| Requirement | Value |
|---|---|
| Capability | manage_woocommerce |
| Minimum default role | Shop manager |
| Requires | WooCommerce |
| Annotations | readOnly: true · destructive: false · idempotent: true · openWorld: false |
Input schema
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
| min_orders | integer | — | Only include customers with at least this many orders. | |
| min_spent | number | — | Only include customers who have spent at least this amount. | |
| role | string | customer |
WordPress role to consider. Defaults to customer. | |
| orderby | string (one of total_spent, order_count) |
total_spent |
Field to sort by. | |
| order | string (one of ASC, DESC) |
DESC |
Sort direction. | |
| page | integer | 1 |
Page number, for pagination. | |
| per_page | integer | 20 |
Results per page (1-100). |
Output schema
| Field | Type | Required |
|---|---|---|
| success | boolean | |
| message | string | |
| data | object | |
| data.customers | object[] | |
| meta | object | |
| meta.ability | string | |
| meta.timestamp | string | |
| meta.execution_time | string \| null | |
| meta.pagination | object |
Example
Sample prompt
Who are my top customers that have ordered at least 3 times and spent over $150?
Example request (json)
{
"jsonrpc": "2.0",
"id": 373,
"method": "tools/call",
"params": {
"name": "mosmcp__list-customer-segment",
"arguments": {
"input": {
"min_orders": 3,
"min_spent": 150
}
}
}
}Example response (json)
{
"jsonrpc": "2.0",
"id": 373,
"result": {
"isError": false,
"structuredContent": {
"success": true,
"message": "1 customer(s) matched the segment.",
"data": {
"customers": [
{
"customer_id": 57,
"email": "jane@example.com",
"first_name": "Jane",
"last_name": "Doe",
"order_count": 4,
"total_spent": "212.40"
}
]
},
"meta": {
"ability": "mosmcp/list-customer-segment",
"timestamp": "2026-09-29T10:15:00+00:00",
"execution_time": "18.4ms",
"pagination": {
"total": 1,
"total_pages": 1,
"current_page": 1,
"has_next": false,
"has_previous": false
}
}
}
}
}
Edge cases / errors
- Computes every customer's stats live, so it is slow on large stores - narrow with role and thresholds.
- orderby other than total_spent/order_count → wcab_invalid_enum.
- No thresholds → every user with the role is returned; users with no orders show 0 / "0.00".
| << Previous | Next >> |
|---|---|
| List Coupons | List Customers |
For more information about the Secure MCP Server for WordPress plugin, explore the following resources:
Product Overview | Pricing | Try for Free | Documentation
If you have any questions regarding plugin configuration, pricing plans or licensing, please contact us or mail us at aisupport@xecurify.com.