Compile (partially evaluate) a query on OPA
opa_compile_queryPartially evaluate a Rego query using the OPA compile endpoint to return the residual query, revealing what remains unknown after substituting known input.
Instructions
Send a query to the OPA server's /v1/compile endpoint for partial evaluation. Returns the residual query -- what remains after substituting in everything that's known.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"query": "<query>"
},
"name": "opa_compile_query"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| input | No | Optional partial input document. | |
| query | Yes | Rego query to compile, e.g. "data.rbac.allow == true". | |
| unknowns | No | Refs to treat as unknown (default: ["input"]). |