counterparty.activity

Live

Episodes + recent actions for a counterparty within a time window.

CategoryCounterparty
JSON-RPCtools/call
EndpointPOST /mcp
Sourcepackages/mcp-tools/src/tools/counterparty-activity.ts

Description

Per ADR-0021 §read-API Family B.

Input schema

FieldTypeRequiredDescription
counterparty_idstringyesCanonical counterparty id.
sincestring (ISO-8601)noDefault 30 days ago.
untilstring (ISO-8601)noDefault now.

Output shape

typescript
{
  counterparty_id: string;
  episodes: Array<{ id: string; source: string; summary: string; occurred_at: string }>;
  recent_actions: Array<{ ledger_entry_id: string; action_class: string; summary: string; occurred_at: string }>;
  world_version: 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": "counterparty.activity", "arguments": { "counterparty_id": "entity_01HXSARAH", "since": "2026-06-01T00:00:00Z" } }

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
{
  "counterparty_id": "entity_01HXSARAH",
  "episodes": [
    { "id": "ep_01H...", "source": "email", "summary": "Sarah: 'Confirming Thursday 3pm works.'", "occurred_at": "2026-06-12T13:24:00Z" }
  ],
  "recent_actions": [
    { "ledger_entry_id": "led_01H...", "action_class": "communicate", "summary": "Sent reply confirming Thursday 3pm.", "occurred_at": "2026-06-12T13:30:00Z" }
  ],
  "world_version": "wv_01HXR4WORLD"
}

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.
not_foundThe requested resource (action_id, decision_id, counterparty_id, etc.) was not found.

See the full error catalog for resolution steps on each code, plus the standard transport-layer responses (401, 429).