Routing Tools
Define and simulate message routing rules that determine which provider, channel, or template to use based on event properties. 3 tools in this category.
routing.propose_rule
Propose a new routing rule. Rules are evaluated in priority order when a message is routed.
Roles: ADMIN_ONLY | draftByDefault: true
| Field | Type | Required | Description |
|---|---|---|---|
name | string | Yes | Rule name |
brandId | uuid | Yes | Brand identifier |
condition | object | Yes | Matching condition |
condition.field | string | Yes | Event field to match (e.g., channel, source) |
condition.operator | enum(eq|neq|in|not_in|gt|lt) | Yes | Comparison operator |
condition.value | any | Yes | Value to match against |
action | object | Yes | Routing action |
action.provider | string | No | Override delivery provider |
action.templateId | string | No | Override template |
action.channel | string | No | Override channel |
priority | integer | No | Rule priority (lower = evaluated first) |
{
"tool": "routing.propose_rule",
"input": {
"name": "Transactional email via Postmark",
"brandId": "brand-uuid",
"condition": {
"field": "channel",
"operator": "eq",
"value": "email"
},
"action": {
"provider": "postmark"
},
"priority": 10
}
}routing.simulate
Simulate message routing to see which rules match and what provider/template would be selected.
Roles: ALL_ROLES
| Field | Type | Required | Description |
|---|---|---|---|
eventName | string | Yes | Event type to simulate |
payload | object | Yes | Sample event payload |
{
"tool": "routing.simulate",
"input": {
"eventName": "lead.captured.v1",
"payload": {
"brandId": "brand-uuid",
"email": "user@example.com",
"source": "vsl_form",
"channel": "email"
}
}
}routing.list
List all routing rules.
Roles: ALL_ROLES
| Field | Type | Required | Description |
|---|---|---|---|
brandId | uuid | No | Filter by brand |
active | boolean | No | Filter by active status |
{
"tool": "routing.list",
"input": {
"brandId": "brand-uuid",
"active": true
}
}