Create sync rule
create_sync_ruleCreate a sync rule: when event_name happens and all conditions match, apply the action to the contact. Returns the rule. Errors: invalid_argument, invalid_event_name, list_not_found, field_not_found (create the contact field first), invalid_tag. Next: track_event to try it, then get_contact or list_contact_events to see the result.
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": {
"name": "<name>",
"event_name": "<event_name>",
"action": "<action>"
},
"name": "create_sync_rule"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | A name for the rule, such as "Tag pro customers". | |
| action | Yes | What to do: {"type": "add_tag", "tag": "customer"}, {"type": "remove_tag", "tag": "trial"}, {"type": "set_field", "key": "plan", "value": "pro"} or {"type": "add_to_list", "list_id": "lst_..."}. | |
| conditions | No | All must match: [{"path": "plan", "op": "eq", "value": "pro"}]. Ops: eq, neq, gt, gte, lt, lte, contains, exists. | |
| event_name | Yes | The event that triggers it, custom or built-in (for example "plan_upgraded" or "tag.added"). |