Rego dependency analysis
rego_depsComputes transitive dependencies for a Rego reference, returning base document and virtual document references it relies on.
Instructions
Static dependency analysis for a Rego reference. Given a target ref like "data.example.allow", returns the base document references (input/data leaves) and virtual document references (rules) it depends on, transitively.
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": {
"paths": "<paths>",
"ref": "<ref>"
},
"name": "rego_deps"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ref | Yes | Reference to compute dependencies for, e.g. "data.example.allow". | |
| paths | Yes | Policy / data paths to load before computing dependencies. Each must be inside an allowed root (OPA_MCP_ALLOWED_PATHS). |