create_segment
ActiveTool of FavCRM
declared in 1.0.0
Create a new customer segment. Use STATIC for manual member lists, DYNAMIC for criteria-based auto-filtering.
Parameters schema
{
"type": "object",
"$schema": "http://json-schema.org/draft-07/schema#",
"required": [
"name"
],
"properties": {
"name": {
"type": "string",
"description": "Segment name"
},
"criteria": {
"type": "object",
"required": [
"operator",
"conditions"
],
"properties": {
"operator": {
"enum": [
"AND",
"OR"
],
"type": "string",
"description": "How to combine conditions"
},
"conditions": {
"type": "array",
"items": {
"type": "object",
"required": [
"type",
"operator"
],
"properties": {
"days": {
"type": "number",
"description": "Days window for time-based conditions"
},
"type": {
"type": "string",
"description": "Condition type, e.g. TOTAL_SPENDINGS, DAYS_SINCE_JOINED, PASS_STATUS, CUSTOM_FIELD"
},
"value": {
"anyOf": [
{
"type": "string"
},
{
"type": "number"
},
{
"type": "boolean"
},
{
"type": "null"
}
],
"description": "Single value for text/date/selection/custom-field conditions"
},
"values": {
"type": "array",
"items": {
"anyOf": [
{
"type": "string"
},
{
"type": "number"
},
{
"type": "boolean"
}
]
},
"description": "Multiple values for IN/NOT_IN conditions"
},
"operator": {
"type": "string",
"description": "Comparison operator, e.g. GT, GTE, LT, LTE, EQ, NEQ, IN, NOT_IN, CONTAINS, BEFORE, AFTER, IS_EMPTY"
},
"fieldName": {
"type": "string",
"description": "Custom field name for custom-field segment conditions"
},
"fieldType": {
"type": "string",
"description": "Custom field type for custom-field segment conditions"
},
"threshold": {
"type": "number",
"description": "Numeric threshold for numeric conditions"
},
"definitionId": {
"type": "string",
"description": "Custom field definition ID for custom-field segment conditions"
}
}
},
"description": "Filter conditions"
}
},
"description": "Dynamic segment criteria"
},
"description": {
"type": "string",
"description": "Segment description"
},
"segmentType": {
"enum": [
"STATIC",
"DYNAMIC"
],
"type": "string",
"description": "Segment type (default DYNAMIC)"
}
}
}Parent server
FavCRM
https://github.com/favcrm/mcp
1/7 registries