evaluate_decision
Evaluates a DMN decision table against instance context to return a decision, matched rules, reasoning, errors, and a tamper-evident receipt for governed or ad-hoc checks.
Instructions
Evaluate a DMN decision table against instance context. Name the table by table_id (and table_version; the highest registered version when omitted) for a governed evaluation, or pass it inline as table_json for an ad-hoc one. Returns decision, matched_rules, reasoning, errors, the table's identity and content hash, and a tamper-evident Receipt whose receipt_hash covers table_id, table_version and table_hash as well as context_hash. instance_path is optional: when omitted, the decision is evaluated against extra_context alone, which is the path external context-only consumers (e.g. MTCP Evidence Packs) should use. Pass previous_hash to chain receipts; the caller is responsible for chain persistence.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| table_id | No | Id of a registered decision table (see register_decision_table and list_decision_tables). Give table_id or table_json, not both. | |
| table_json | No | JSON string defining the decision table inline, for an ad-hoc evaluation (the Receipt then carries the table's content hash but no id or version). Format: {"name": "...", "hit_policy": "FIRST|UNIQUE|COLLECT", "rules": [{"conditions": [{"field": "...", "op": "==|!=|<|<=|>|>=|in|not_in", "value": ...}], "outcome": "PERMIT|DENY|INDETERMINATE", "description": "..."}]} | |
| instance_id | No | Identifier for the entity being evaluated, recorded in the Receipt. For SDC instances this is the DM instance_id (CUID2). For external consumers this is the entity identifier (e.g. an MTCP model_id such as 'gpt-4o'). | |
| context_hash | No | SHA-256 hash of the extra_context payload, computed by the caller. Binds the Receipt cryptographically to the context that produced the decision. MTCP consumers pass the Evidence Pack hash here. | |
| extra_context | No | JSON string with additional context key-value pairs. | {} |
| instance_path | No | Path to the XML instance file for context extraction. Optional. Omit to evaluate against extra_context only. | |
| previous_hash | No | SHA-256 hash of the prior Receipt in the caller's chain. Pass null (default) to start a new chain. The caller is responsible for chain persistence. | |
| table_version | No | Version of the registered table. Omit for the highest registered version; the Receipt records the version that was used. | |
| instance_version | No | Version of the entity being evaluated, recorded in the Receipt. |