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.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "opa_list_policies"
}
}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. |