subscriptions.create

Live

Declare interest in a slice of substrate activity.

CategorySubscriptions
JSON-RPCtools/call
EndpointPOST /mcp
Sourcepackages/subscriptions/src/tools/subscriptions-create.ts

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

FieldTypeRequiredDescription
action_classstringyesCanonical or namespaced custom class.
counterparty_filter{ id?: string; classification?: string }noFilter to a specific counterparty or class.
mode_filterArray<'ask' | 'notify' | 'silent'>noRestrict to specific modes.
expires_atstring (ISO-8601)noOptional 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

CodeMeaning
invalid_argumentsTool input failed Zod validation.
unauthorizedMissing or invalid bearer token.
quota_exceededPer-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).