You're viewing a demo portfolio

Join the waitlist
PRSM

preview_segment_count

Active

Tool of FavCRM

declared in 1.0.0

Preview how many customers would match dynamic segment criteria before creating or updating a segment.

Parameters schema

{
  "type": "object",
  "$schema": "http://json-schema.org/draft-07/schema#",
  "properties": {
    "criteria": {
      "anyOf": [
        {
          "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"
            }
          }
        },
        {
          "type": "null"
        }
      ],
      "description": "Dynamic criteria to preview. Omit or null to count all active customers."
    }
  }
}

What this tool wraps· 1 endpoint

min confidence0.700.50

Parent server

FavCRM

https://github.com/favcrm/mcp

1/7 registries
View full server →