create_segment
Save a group of marketing subscribers to email.
Authentication required
Endpoint
endpoint
https://business.sessions.website/@<handle>/api/mcpWhen to use it
For the "create a marketing segment" setup step.
Before
send_broadcast, to aim it at regulars, new sign-ups or a tier.
Parameters
namestringrequirede.g. "Regulars".
descriptionstringoptionalmatchstringoptionalMatch every condition (default) or any one.
One of: all, any
conditionsarrayoptionale.g. {field: "bookingCount", operator: "gte", value: "5"}, {field: "signupDate", operator: "after", value: "2026-01-01"}, {field: "metadata.tier", operator: "in", values: ["gold"]}, {field: "metadata.newsletter", operator: "exists"}.
Returns
The segment with its id, or per-field errors.
Example
POST this to the endpoint above.
JSON-RPC
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "create_segment",
"arguments": {
"name": "Regulars",
"conditions": [
{
"field": "bookingCount",
"operator": "gte",
"value": "5"
}
]
}
}
}content
Created segment "Regulars" [<id>]. Email it with send_broadcast (segment: <id>).What the agent is told
The description the model reads when deciding whether to call this. It is the only thing that decides whether the tool fires at the right moment, so it is worth knowing what it says.
create_segment
Save a group of customers to email: everyone matching all (or any) of the conditions. Only customers who agreed to marketing email are ever in a segment; with no conditions it is every subscriber. Needs the marketing area on your role.