---
title: "Declarative Decision-Tree Evaluator"
method: POST
path: "/v1/tools/evaluate_decision_tree"
tags: ["compliance_mandate", "decision-tree", "rule-engine", "citation-gated", "reg-d", "accredited-investor", "classification", "mcp:evaluate_decision_tree"]
---

# Declarative Decision-Tree Evaluator

`POST /v1/tools/evaluate_decision_tree`

## Request

- Base URL: `https://ainumbers.co`
- URL: `https://ainumbers.co/v1/tools/evaluate_decision_tree`
- Auth: none declared

Evaluates a caller-supplied, hash-pinned decision tree against caller-supplied facts entirely offline, client-side. The tree is inert data -- one audited interpreter walks it over a closed operator set (eq, in, lt, lte, gt, gte, between, all_of, any_of, none_of); no eval, no expression strings, no function-valued criteria. Every node, internal criteria included and not leaves only, must carry a citation {clause, source, source_digest, snapshot_location}; a tree with any uncited node is rejected by the loader before evaluation. The tree's own declared tree_digest is never trusted as an oracle for itself: it is recomputed from the tree's canonicalized bytes and evaluation refuses to proceed on a mismatch. Bounds (max_depth=12, max_nodes=256, max_tree_bytes=64KiB) are declared and enforced, cycle-acyclicity is checked at load, and evaluation walks an explicit iterative pointer, never recursion. Ships with one demonstrator tree, the Reg D Rule 501(a) entity-type accredited-investor category test (17 CFR 230.501(a)(1)/(2)/(3)/(8)/(9)), enumerated exhaustively over its 5 declared boolean fields -- 32 combinations, 0 unexplained results -- because every criterion in that tree is a bounded enum. This is never a full accredited-investor determination: the natural-person prongs ((a)(4)-(a)(7), (a)(10)-(a)(13)) and every numeric-threshold test are explicitly out of the demonstrator's declared scope. The kernel itself carries no classification rules of its own; a caller must supply its own tree to get a different classification.

**Tool URL:** https://ainumbers.co/chaingraph/art-628-declarative-decision-tree-evaluator.html

## Request body

- object
  - `tree` object
  - `facts` object

## Response `200`

Successful tool execution result

- object
  - `verdict` string, nullable
  - `error_code` string, nullable
  - `message` string, nullable
  - `matched_node_id` string, nullable
  - `matched_citation` object, nullable
  - `path` string[]
  - `weight` unknown
  - `tree_id` string, nullable
  - `tree_version` string, nullable
  - `tree_digest_recomputed` string, nullable
  - `bounds` object
  - `closed_operator_set` string[]
  - `scope_note` string

---

[API](https://skmtc.dev/ainumbers/apis/ainumbers-co-fintech-intelligence-suite.md) · [All operations](https://skmtc.dev/ainumbers/apis/ainumbers-co-fintech-intelligence-suite/llms.txt) · [OpenAPI document](https://skmtc.dev/ainumbers/apis/ainumbers-co-fintech-intelligence-suite/revisions/b462e4f5bb28?raw)
