meta.what_rules_fired

Live

List the rules that participated in a decision with their weights.

CategoryMeta
JSON-RPCtools/call
EndpointPOST /mcp
Sourcepackages/mcp-tools/src/tools/meta-what-rules-fired.ts

Description

For any decision_id, returns the full list of rules that participated in producing it, each with weight and confidence. Per ADR-0021 §read-API Family A.

Input schema

FieldTypeRequiredDescription
decision_idstringyesThe decision id.

Output shape

typescript
{
  decision_id: string;
  rules_fired: Array<{ rule_id: string; rule_summary: string; weight: number; confidence: string }>;
  agent_version: 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": "meta.what_rules_fired", "arguments": { "decision_id": "dec_01HX..." } }

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
{
  "decision_id": "dec_01HX...",
  "rules_fired": [
    { "rule_id": "rul_01HX...", "rule_summary": "Reply quickly to Marcus on Tuesdays.", "weight": 0.7, "confidence": "strong_pattern" },
    { "rule_id": "rul_01HZ...", "rule_summary": "Default tone for known colleagues is casual+brief.", "weight": 0.3, "confidence": "pretty_sure" }
  ],
  "agent_version": "av_01HXP9AGENT",
  "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).