reason
Prove goals against a knowledge base with multi-step deduction and return each solution's proof tree for verification.
Instructions
Prove a goal against a knowledge base and return every solution with its proof.
Use this for any question that needs multi-step deduction over facts and rules: transitive relations, permission inheritance, property inheritance, eligibility checks, or filtering a large fact set by a rule.
The goal comes from the query parameter, or from the ? ... line(s) in
knowledge when query is omitted.
Returns ReasonResult:
ok(bool): false when the request could not be evaluated.solutions(list): each hasbindings(list of{var, value}, empty for a ground yes/no query),proof(a tree of{goal, type, children}where type isfact,ruleorand), andproof_text(the tree rendered as indented text).solution_count(int): how many solutions are returned.truncated(bool): true when more solutions existed thanmax_solutions.error(str | null): a readable, actionable message whenokis false.
An empty solutions list with ok: true means the goal is false under
closed-world semantics - the knowledge base does not entail it.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| params | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ok | Yes | False when the request could not be evaluated. | |
| error | No | Readable, actionable message when ok is False. | |
| solutions | No | ||
| truncated | No | True when more solutions existed than `max_solutions`. | |
| solution_count | No | Number of solutions returned. |