Create segment
Creates a segment with a name and, for a dynamic one, filters.
MCP tool mautic_write → create_segment
Creates a segment as the New button on Segments does. With filters it is dynamic: each filter is a field, an operator and a value, joined with and or or. A field appears as a filter only when it has Available for Segments set to Yes in the custom field settings. Without filters the segment is static and starts empty. A new segment reaches nobody, but it can feed a campaign. By default you confirm each call; you can switch that off for this tool.
Parameters
| Name | Type | Description |
|---|---|---|
| name string required | string | Segment name. |
| description string | string | Description shown in the segment list. |
| filters array | array | Filters as objects with field, operator, value and glue (and or or). |
tools/call
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "mautic_write",
"arguments": {
"operation": "create_segment",
"arguments": {
"name": "Jane Doe"
}
}
}
} Example response
{
"content": [
{
"type": "text",
"text": "{ ... same JSON as structuredContent ... }"
}
],
"structuredContent": {
"segment_id": 9,
"name": "Inactive 90 days",
"alias": "inactive-90-days",
"type": "dynamic",
"active": true
},
"isError": false
}