subscribe
Set up event subscriptions to get notified of substrate changes via webhook or SSE, filtered by entity types, IDs, or event types, with loop prevention.
Instructions
Create a substrate event subscription (webhook with HMAC delivery, or SSE via GET /events/stream). Requires at least one filter among entity_types, entity_ids, or event_types. Optional sync_peer_id skips webhook delivery when the substrate event carries the same source_peer_id (cross-instance loop prevention).
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": {
"delivery_method": "<delivery_method>"
},
"name": "subscribe"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| entity_ids | No | ||
| event_types | No | ||
| webhook_url | No | ||
| entity_types | No | ||
| max_failures | No | ||
| sync_peer_id | No | When set, webhook deliveries skip substrate events whose `source_peer_id` equals this value (prevents notifying a peer about changes that originated from that peer). | |
| webhook_secret | No | ||
| delivery_method | Yes |