Skip to main content
Glama
OrygnsCode

opa-mcp-server

Formally verify a Rego policy rule

rego_verify
Read-onlyIdempotent

Formally verify Rego rule properties by checking all possible inputs with SMT solving. Proves always_true, never_true, or satisfiable, or returns a counterexample.

Instructions

Formally verify a property about a Rego rule using SMT solving (Microsoft Z3). Unlike testing, this checks ALL possible inputs and either proves the property holds or returns a concrete counterexample input that falsifies it. Supports equality, comparison, startswith, endswith, contains, regex.match, and multi-clause rules. Reports INCONCLUSIVE for negation-as-failure (not), comprehensions, and other unsupported constructs.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sourceYesRego source to verify.
ruleYesName of the rule to verify (e.g. "allow", "deny").
kindYesProperty to prove: always_true - rule is true for every possible input (finds inputs that violate this) never_true - rule is never true for any input (finds inputs that trigger it) satisfiable - at least one input exists where rule is true (returns a witness)
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations indicate read-only, non-destructive, idempotent behavior, and the description adds that it checks all possible inputs, uses SMT solving, and can return INCONCLUSIVE for unsupported constructs. No contradiction, and useful beyond annotations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single paragraph with concise, information-dense sentences. Every sentence adds value without repetition or fluff.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given no output schema, the description explains the outcome (proof, counterexample, or INCONCLUSIVE) and covers supported/unsupported constructs. It is complete for the tool's complexity.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Input schema covers all 3 parameters with descriptions, so the description does not need to add per-parameter details. It provides overall context (supported constructs, INCONCLUSIVE) but no extra parameter-specific semantics, meeting the baseline for high schema coverage.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool formally verifies a property about a Rego rule using SMT solving, distinguishing it from testing by checking all possible inputs. It lists supported constructs and mentions INCONCLUSIVE for unsupported ones, providing a specific verb and resource.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description contrasts with testing and describes when it applies (formal verification) and which constructs are supported or unsupported, giving implicit usage guidance. However, it does not explicitly mention when to prefer this over sibling tools like rego_test or opa_exec.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/OrygnsCode/opa-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server