List OPA policies
opa_list_policiesList policies registered on the OPA server, returning IDs and a count. Optionally include Rego source or parsed AST for each policy.
Instructions
List policies registered on the running OPA server. Returns the policy IDs and a count. Set includeSource for the Rego text of every policy, or includeAst for the parsed AST of every policy; both are off by default because either one pushes a list of any real size past the response cap.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| includeAst | No | Include each policy's parsed AST. Off by default; it is roughly forty times the size of the source and will exceed the response cap on all but the smallest servers. | |
| includeSource | No | Include each policy's Rego source. Off by default: fetch one policy with `opa_get_policy` rather than every policy at once. |