Preview a feature rule
preview_feature_ruleCheck a feature rule before saving it; saves nothing. matched_events: events the conditions match in the range, pageviews included. Rules have no precedence: saving counts all of them toward feature_name, whatever else names them. already_in_feature: those feature_name already counts; new_events: the rest; unassigned_events: those no feature names yet. also_counted_as: other features that also count some of them and keep doing so (not a conflict; a long list can mean too broad). With feature_name, feature_total_after_save is what list_features will show once saved. top_elements shows what matched. Events, not visitors. At most 92 days per call. Dates are the project's calendar days, YYYY-MM-DD (timezone: get_project); timestamps are UTC. Omit from/to for the last 28 complete days, ending yesterday.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"conditions": "<conditions>"
},
"name": "preview_feature_rule"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| to | No | Last day, YYYY-MM-DD in the project's timezone, inclusive. Default: yesterday, the last complete day. | |
| from | No | First day, YYYY-MM-DD in the project's timezone, inclusive. Default: 27 days before 'to'. At most 92 days in one call. | |
| project | No | Project ID, from list_projects. Required when this connection covers more than one project; may be left out when it covers one (and with an API key, which belongs to one project). | |
| conditions | Yes | Conditions, exactly as for creating a rule: every item must match (AND); an item is one condition (property, operator, value) or an any group of conditions of which at least one must match (OR). | |
| feature_name | No | The feature name you would save the rule under. Optional; with it the answer includes the feature's total after saving. |