subscriptions.create
LiveDeclare interest in a slice of substrate activity.
Description
Subscription evaluator (polled at 5-min cadence in MVP; event-hooked V1.1+) matches substrate decisions against active subscriptions and fans matches into the dispatch service. Per ADR-0021 §subscriptions.
Input schema
| Field | Type | Required | Description |
|---|---|---|---|
action_class | string | yes | Canonical or namespaced custom class. |
counterparty_filter | { id?: string; classification?: string } | no | Filter to a specific counterparty or class. |
mode_filter | Array<'ask' | 'notify' | 'silent'> | no | Restrict to specific modes. |
expires_at | string (ISO-8601) | no | Optional expiry. |
Output shape
typescript
{ subscription_id: string }Example call
JSON-RPC tools/call request body (omit the JSON-RPC envelope when using an SDK; the SDK adds it for you):
jsontools/call params
{
"name": "subscriptions.create",
"arguments": {
"action_class": "communicate",
"counterparty_filter": { "classification": "colleague" },
"mode_filter": ["ask"]
}
}Example response
Tool results are always wrapped as content[0].text with a stringified JSON body. The shape below is what you get back from JSON.parse(result.content[0].text):
jsonparsed result body
{ "subscription_id": "sub_01H..." }Errors this tool can return
| Code | Meaning |
|---|---|
invalid_arguments | Tool input failed Zod validation. |
unauthorized | Missing or invalid bearer token. |
quota_exceeded | Per-minute, daily call, or daily inference budget exceeded. |
See the full error catalog for resolution steps on each code, plus the standard transport-layer responses (401, 429).