Check Rego
rego_checkType-check Rego policies using OPA's check command. Returns validation status and structured error diagnostics with file and line locations.
Instructions
Type-check Rego with opa check. Returns { valid: true, errors: [] } on success, or a list of structured diagnostics with file/line locations on failure. Provide either source for inline checking or paths for file/directory checking.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| source | No | Inline Rego source. Mutually exclusive with `paths`. | |
| paths | No | Filesystem paths to check. Each path must be inside an allowed root (OPA_MCP_ALLOWED_PATHS). | |
| strict | No | Enable strict mode — fail on unused vars, deprecated builtins, etc. | |
| capabilities | No | Path to a capabilities JSON file restricting allowed builtins. | |
| schemaDir | No | Schema directory for input/data validation. |