AI agent
Three strict function tools that let an agent list, check and explain rules, and a response format that drafts a rule for review.
Files: bindings/llm-tools.json,
bindings/rule-draft.response-format.json
(README).
| Tool | Arguments | Use |
|---|---|---|
list_rules | ruleset, entity, operation | Which rules apply to this operation |
evaluate_rules | ruleset, entity, operation, data_json, original_json, view, resolutions | Check a proposed operation before performing it |
explain_rule | ruleset, rule_id | One rule, to explain a finding |
Both files are written for OpenAI strict mode: every object has additionalProperties: false,
every property is in required, optional values are nullable. data_json and original_json are
JSON text because a strict schema cannot describe an object with arbitrary members. The actor is
not an argument: the host takes it from its own authentication.
The description of evaluate_rules, which is what the model reads, from llm-tools.json:
Check a proposed operation against the business rules without changing anything. Returns decision (allow or deny), findings with severity, field pointers and location (the page, screen, section and component the rule names), field effects and computed values. Always call this before calling an API operation that creates, updates or deletes the entity, and never present a denied operation as done.
A complete host over the Python runtime is in the bindings README and in the AI agent tools playbook, where it is run against the published bundles. A draft produced with the response format goes through the same schema, load checks, golden tests and review as a hand-written rule (drafting a rule).
A runnable version over the HTTP rule server is in examples/agent-tools:
a dispatcher that maps list_rules, evaluate_rules and explain_rule onto the server's routes,
with tests that CI runs on every push. Each tool maps one-to-one onto an MCP tool.