Skip to main content
Glama

OPA MCP Server

CI CodeQL npm version Docker pulls OPA Ecosystem License: MIT Node.js opa-mcp-server MCP server

A Model Context Protocol (MCP) server that turns any MCP-compatible client (Claude Desktop, Claude Code, Cursor, VS Code, Windsurf, Zed, and others) into a first-class Open Policy Agent and Rego authoring environment.

+--------------------+ MCP/stdio  +-----------------+ spawn/HTTP +---------------------+
|  Claude · Cursor · |----------> | @orygn/opa-mcp  |----------> | opa · regal         |
|   VS Code · ...    |<---------- |                 |<---------- | conftest · REST API  |
+--------------------+  52 tools  +-----------------+            +---------------------+

Status: v0.8.0. Tool surface, error codes, and environment variables follow SemVer from v0.1.0 forward.

Upgrading to 0.8.0: opa_exec loads dataPaths as opa eval --data does, so a directory that also holds test fixtures, or JSON and YAML that is not data, can now fail to load; pass it as bundle to load it as before. A policy that does not load is INVALID_REGO in opa_exec and the conftest tools, where it was EVAL_ERROR and UNKNOWN_ERROR.

Upgrading to 0.7.0: Node.js 22 or later is required. The bundled OPA is 1.21, which reads YAML against the 1.2 schema: bare yes, no, on and off in data files are strings now, not booleans. If you supply your own binary via OPA_BINARY or PATH, only the Node requirement applies.

Upgrading to 0.6.0: rego_bench reports iterations, nsPerOp, allocsPerOp and bytesPerOp. The fields opa prints (N, T, Bytes, MemAllocs, MemBytes, Extra) were top-level and now sit under raw for a single run, so anything that read them from the top level has to look there. With count above one, raw is omitted: every document is in runs, and fastest indexes the one the top-level figures come from.

Upgrading to 0.4.0: subprocesses no longer inherit the server's environment. A policy that read a variable through opa.runtime().env will no longer see it; name the variable in OPA_MCP_PASSTHROUGH_ENV if it is genuinely needed. See the security section for why.

Upgrading to 0.3.0: the bundled OPA is now 1.19, so Rego v0 policies no longer parse (if is required before a rule body, contains before a partial set). Run rego_migrate_v1 to convert them, or pass v0Compatible: true to load one as it is. If you supply your own binary via OPA_BINARY or PATH, nothing changes.


Table of contents

Related MCP server: kubernetes-mcp

What you can do with it

Once an MCP client is connected, an agent can:

  • Author Rego. Generate, format, and refactor policies. The server runs the real opa fmt and opa parse so output is byte-identical to what you'd get on the command line, and regal (optional) surfaces idiomatic suggestions.

  • Evaluate against data. Run a query against a policy and an input document. Optional --explain, --profile, and --coverage flags surface execution traces, hot rules, and per-line coverage.

  • Debug a deny. rego_explain_decision walks the agent through every rule that fired (and every one that didn't), so it can answer "why was this rejected" without you reading the trace by hand.

  • Manage policies on a running OPA. List, get, put, delete policies on an OPA server through its REST API. Works against a local opa run --server or a production deployment with bearer-token auth.

  • Build & sign bundles. Package a directory of policies into a deployable bundle, optionally signing it. Output is a regular .tar.gz the agent can hand to your delivery system.

  • Lint. rego_lint runs Regal across a directory or a single file and returns each finding with its category, level and location.

A walk-through of a typical session lives in Cookbook.

Why this MCP

OPA already has a perfectly good CLI and REST API. So why an MCP wrapper?

  • Schema-shaped tool surface. An agent calling rego_eval gets a validated input schema, a structured output envelope, and stable error codes, instead of parsing free-form CLI text and inventing its own failure taxonomy. That alone makes Rego usable to an agent the way a language server makes a language usable to an IDE.

  • Higher-level helpers. rego_explain_decision, rego_generate_test_skeleton, rego_describe_policy, and rego_suggest_fix compose the lower-level primitives into the tasks agents are actually asked to do. They don't exist in the OPA CLI.

  • Curated knowledge. The bundled MCP resources expose the OPA built-in function catalog, the official Rego style guide (formatted for LLMs), and a curated pattern library covering RBAC, ABAC, Kubernetes admission, IaC gates, API authz, and rate limiting, so the agent has authoritative context without needing to scrape it.

  • Safety boundaries the agent can rely on. Path allow-list, subprocess timeouts, and response-size caps. Defaults are conservative; running the server doesn't quietly grant the agent more reach than the operator intended.

If you've ever watched an agent fight opa eval's argument order, you'll recognize the gap this fills.

Install

The server runs locally over stdio. Pick the install path that matches your client.

Claude Desktop

Edit claude_desktop_config.json directly (or copy from examples/claude-desktop.json):

{
  "mcpServers": {
    "opa": {
      "command": "npx",
      "args": ["-y", "@orygn/opa-mcp"],
      "env": {
        "OPA_BINARY": "/usr/local/bin/opa",
        "REGAL_BINARY": "/usr/local/bin/regal",
        "OPA_URL": "http://localhost:8181",
        "OPA_MCP_ALLOWED_PATHS": "/path/to/your/policies"
      }
    }
  }
}

Replace the /usr/local/bin/... paths with your real ones. See the first-time install gotcha below. Windows users substitute C:\\path\\to\\opa.exe.

Or download opa-mcp.mcpb from the latest release and double-click it.

Alternatively, use the Smithery one-liner:

npx -y @smithery/cli install @orygn/opa-mcp --client claude

Claude Code (CLI)

Register the server for the current project with claude mcp add:

claude mcp add \
  --env OPA_BINARY=/usr/local/bin/opa \
  --env REGAL_BINARY=/usr/local/bin/regal \
  --env OPA_MCP_ALLOWED_PATHS=/path/to/your/policies \
  opa -- npx -y @orygn/opa-mcp

This writes the config into .mcp.json at your project root and is picked up automatically on every claude session in that directory. Add --scope user to register it globally instead.

Replace the paths with your real absolute paths (same caveat as Claude Desktop above). On Windows use C:\path\to\opa.exe syntax.

Persistent context and auto-checks for policy repos. If you work in an OPA policy repo regularly, two extra files remove repetitive setup from every session:

  • examples/CLAUDE.md -- copy to your repo root or .claude/CLAUDE.md. Claude Code loads it every session, so the agent always knows which tools to use and what conventions apply.

  • examples/claude-code-hook.json -- merge the hooks block into .claude/settings.json. Runs opa check automatically after any .rego file is written, so syntax errors surface immediately without a manual tool call.

Cursor

Drop examples/cursor.json into either .cursor/mcp.json (project-scoped) or ~/.cursor/mcp.json (user-scoped).

VS Code (GitHub Copilot Chat)

Drop examples/vscode.json into .vscode/mcp.json, or paste the servers block into your user settings.json under mcp.servers.

Windsurf, Zed, and others

See examples/ for a full set of drop-in configs.

Manual install (any MCP client)

npm install -g @orygn/opa-mcp
opa-mcp --version

then point your client at the opa-mcp binary.

Docker

docker pull orygn/opa-mcp:latest
docker run --rm -i \
  -v /path/to/your/policies:/policies:ro \
  -e OPA_MCP_ALLOWED_PATHS=/policies \
  orygn/opa-mcp

The image is multi-arch (linux/amd64, linux/arm64), bundles pinned versions of opa and regal, and runs as a non-root user. No host install of OPA or Regal is required.

⚠ If every tool call returns OPA_BINARY_NOT_FOUND

The npm package carries its own opa for the five platforms it is built for, so a client PATH without opa on it does not matter there. The MCPB has no bundled copy, and on any other platform neither does npm: then the server boots but every tool call returns OPA_BINARY_NOT_FOUND. Neither the npm package nor the MCPB bundles regal or conftest, and the Docker image ships regal but not conftest, so their tools need a PATH entry or an explicit path either way.

Fix: add OPA_BINARY and REGAL_BINARY env entries to your client config with the absolute path to each binary. The example configs under examples/ ship with placeholder paths you replace. Find the real paths with:

which opa && which regal                                    # macOS / Linux
Get-Command opa, regal | Select-Object Source              # Windows

This does not affect the Docker install path, which ships opa and regal in the image and bypasses PATH entirely. The MCPB bundle carries neither, and unlike the npm install has no bundled fallback: set OPA_BINARY or put opa on PATH. See Troubleshooting for full detail.

Configuration

The server reads its configuration from environment variables. Every variable is optional; defaults are sensible for a local OPA on http://localhost:8181.

Variable

Default

Purpose

OPA_URL

http://localhost:8181

Base URL of an OPA REST endpoint, used by opa_* tools.

OPA_TOKEN

(unset)

Bearer token for OPA, if your instance requires auth. Treated as a secret. Never echoed in logs or tool responses.

OPA_BINARY

opa (on PATH)

Path to the opa CLI, used by rego_* tools.

REGAL_BINARY

regal (on PATH)

Path to the regal linter. Required by rego_lint, rego_fix, and rego_security_audit.

CONFTEST_BINARY

conftest (on PATH)

Path to the conftest binary. Only required by conftest_* tools. Returns CONFTEST_NOT_FOUND if absent.

OPA_MCP_ALLOWED_PATHS

(unset)

Comma- or semicolon-separated list of directories the server is allowed to read policies from. When unset, file-based tools refuse to read from disk.

OPA_MCP_LOG_FILE

<tmpdir>/orygn-opa-mcp.log

Path the server appends logs to. The server never writes to stdout; that channel is reserved for the MCP protocol.

OPA_MCP_LOG_LEVEL

info

One of debug, info, warn, error.

OPA_MCP_MAX_RESPONSE_BYTES

100000

Hard cap on a single tool response. Larger payloads are truncated with a __truncated: true marker. Values below 512 are refused.

OPA_MCP_TIMEOUT_MS

30000

Hard timeout for any spawned subprocess (opa, regal). After this, the child gets SIGTERM and then SIGKILL.

OPA_MCP_HTTP_TIMEOUT_MS

15000

Timeout for each request to the OPA REST API, from the connection attempt to the last byte of the response; reported as TIMEOUT.

OPA_MCP_NO_TELEMETRY

(unset)

Set to 1 to disable the anonymous startup ping. The ping sends the server version, OS platform, and a random install ID. The install ID is stored at ~/.orygn/opa-mcp/install-id and is generated once on first run. No policy content or file paths are ever sent.

OPA_MCP_MAX_SUBPROCESS_BYTES

33554432 (32 MiB)

Maximum bytes captured from a subprocess's stdout and stderr, counted separately. On overflow the stream is clamped, the child is stopped, and the tool returns OUTPUT_TOO_LARGE. Distinct from OPA_MCP_MAX_RESPONSE_BYTES, which trims the reply after the output is already in memory.

OPA_MCP_PASSTHROUGH_ENV

(unset)

Comma-separated variable names to pass through to opa, regal and conftest. Everything else is withheld. Anything named here is readable by any policy the server evaluates, via opa.runtime().env, so use it only for values that are safe in that position.

OPA_MCP_BLOCK_ENV

(unset)

Comma-separated variable names to withhold from opa, regal and conftest even when they are on the built-in allow-list. Applied last, so it also overrides OPA_MCP_PASSTHROUGH_ENV. Use it to drop the proxy variables, which can carry credentials, at the cost of proxy support.

Paths in OPA_MCP_ALLOWED_PATHS must be absolute, and a *_BINARY value is either a bare command name looked up on PATH or an absolute path; anything else stops the server at startup. A binary that cannot be run is reported by each tool call with a structured error.

Tool reference

Every tool returns a JSON envelope:

{ "ok": true, "data": { ... }, "warnings": [ ... ] }
{ "ok": false, "error": { "code": "INVALID_REGO", "message": "...", "hint": "...", "details": { ... } } }

Stable error codes: INVALID_INPUT, INVALID_REGO, INVALID_BUNDLE, EVAL_ERROR, OPA_BINARY_NOT_FOUND, REGAL_NOT_FOUND, CONFTEST_NOT_FOUND, OPA_UNREACHABLE, OPA_AUTH_FAILED, POLICY_NOT_FOUND, DATA_NOT_FOUND, PATH_NOT_ALLOWED, PATH_NOT_FOUND, NO_TESTS_FOUND, COVERAGE_BELOW_THRESHOLD, OPA_VERSION_UNSUPPORTED, GITHUB_TOKEN_MISSING, GIST_CREATE_FAILED, OUTPUT_TOO_LARGE, SUBPROCESS_KILLED, OPA_URL_INVALID, TIMEOUT, CANCELLED, UNKNOWN_ERROR. A rego_eval batch can also give an entry NOT_EVALUATED: an input the call stopped before reaching, after another timed out.

Category A: Authoring & static analysis

Operate on Rego source code without needing a running OPA server. Wrap opa fmt, opa parse, opa check, opa inspect, opa capabilities, opa deps, and regal.

Tool

What it does

rego_format

Format Rego source. Wraps opa fmt. Idempotent.

rego_check

Type-check and validate Rego. Wraps opa check.

rego_lint

Run Regal across a file or directory. Returns each violation with its category, level and location. Requires regal on PATH or REGAL_BINARY set.

rego_parse_ast

Parse Rego to AST JSON. Wraps opa parse.

rego_inspect

Inspect a bundle or directory: packages, rules, annotations. Wraps opa inspect.

rego_capabilities

List the built-ins and features the resolved opa binary understands (OPA_BINARY, then PATH, then the bundled copy); builtins names up to 100 to return full records for

rego_deps

Static dependency analysis: rule-level data references and cross-package calls.

rego_migrate_v1

Migrate Rego v0 source to v1. Renames a rule v1 reserves the name of (contains, every, if, in) and replaces the built-ins v1 removed, with exact equivalents, before opa fmt --rego-v1 converts the syntax and opa check validates it. Given inputs, evaluates the original as v0 and the result as v1 on each and reports any rule that differs, plus any queries, which is how functions are compared. Returns { original, migrated, changed, valid, errors, rewrites, notes, equivalence }.

rego_check_schema

Check Rego against a JSON Schema. Validates that every input.* field the policy reads exists in the schema using opa check --schema. Accepts an inline schema, a path to a JSON Schema file, or a schema directory when the policy declares schemas: annotations.

// Input
{
  "source": "package x\nallow if input.user==\"admin\""
}

// Output (ok)
{
  "ok": true,
  "data": {
    "formatted": "package x\n\nallow if input.user == \"admin\"\n",
    "changed": true
  }
}
// Input
{
  "source": "package x\nallow if y",
  "strict": true
}

// Output (error path; the JSON diagnostics arrive on stderr from opa)
{
  "ok": true,
  "data": {
    "valid": false,
    "errors": [
      {
        "code": "rego_unsafe_var_error",
        "message": "var y is unsafe",
        "location": { "row": 2, "col": 11 }
      }
    ]
  }
}

Category B: Evaluation & testing

Run a query against a policy and input. Wrap opa eval, opa test, and opa bench. Each of these tools takes v0Compatible to load a policy written before OPA 1.0 without migrating it, and so does every other tool that reads a policy through opa or conftest, from rego_check to rego_verify and conftest_test. OPA then reads the query as v0 too, so the future keywords are imported for it and in and every still work there. rego_policy_diff takes it per side (v0CompatibleA, v0CompatibleB), to compare a legacy policy with its migrated copy. The exceptions are rego_deps, since opa deps has no such option, and the Regal tools, which need none, since Regal reads either version.

Tool

What it does

rego_eval

Evaluate a query against a policy and input. The bread-and-butter tool. inputs evaluates the query against up to 50 input documents in one call and reports each; with no policy, a query alone tries out a built-in or an expression.

rego_eval_with_explain

Evaluate with --explain=full and return a structured trace.

rego_eval_with_profile

Evaluate with --profile and return per-rule timing and evaluation counts.

rego_eval_with_coverage

Evaluate with --coverage and return per-line coverage.

rego_test

Run Rego unit tests with opa test. Returns pass, fail, skip and error counts plus per-test records; errored counts tests OPA could not evaluate. With coverage or threshold OPA emits a coverage report instead of per-test records.

rego_bench

Run opa bench and return statistical timing data.

rego_compile_query

Partially evaluate a query against a policy.

opa_exec

Batch-evaluate a decision against multiple input files. Returns per-file results with successCount and errorCount. dataPaths load as opa eval --data loads them; bundle takes a bundle.

rego_test_multiroot

Run opa test once per root and aggregate. Use when opa test . hits package conflicts. Totals include totalErrored.

// Input
{
  "query": "data.rbac.allow",
  "source": "package rbac\nimport rego.v1\nallow if input.role == \"admin\"",
  "input": { "role": "admin" }
}

// Output
{
  "ok": true,
  "data": {
    "result": [{ "expressions": [{ "value": true, "text": "data.rbac.allow", "location": { "row": 1, "col": 1 } }] }]
  }
}

Category C: Bundle operations

Package, sign, and verify deployable bundles. Wrap opa build, opa sign, and opa build --verification-key.

Tool

What it does

opa_bundle_build

Build a .tar.gz bundle from a policy directory. Supports optimize and revision.

opa_bundle_sign

Sign a bundle directory in place with a private key; an archive is refused, since OPA reads the signature from inside it, and comes signed from opa_bundle_build. A directory signature stays valid wherever the directory is placed under the same name. Returns the path, algorithm, and file count.

opa_bundle_verify

Verify a signed bundle with a public key through opa build --verification-key. Failures name the reason: wrong key, scope, modified, added, missing or unparseable file, unsigned, or a bundle that does not load.

Category D: OPA server management

Talk to a running OPA server over its REST API. Require OPA_URL to point at a reachable server.

Tool

What it does

opa_list_policies

List the policy IDs registered on the server, with a count. includeSource and includeAst add the Rego text or the parsed AST.

opa_get_policy

Get a single policy by ID. Returns the Rego source; includeAst adds OPA's parsed AST.

opa_put_policy

Upload or replace a policy.

opa_delete_policy

Delete a policy by ID.

opa_get_data

Read a path from the data hierarchy.

opa_put_data

Write to a path in the data hierarchy.

opa_patch_data

Apply a JSON Patch to the data hierarchy.

opa_delete_data

Delete a document from the data hierarchy.

opa_query_decision

POST to a /v1/data/... decision endpoint with input.

opa_compile_query

Partially evaluate a query against the running server.

opa_health

Liveness / readiness check. A server that answers reports healthy: true or healthy: false with OPA's reason; OPA_UNREACHABLE means it could not be reached at all.

opa_status

The same GET /v1/config document as opa_config, under a status key. Bundle and decision-log status (/v1/status) is not exposed. Service header values are redacted.

opa_config

Server configuration from GET /v1/config. OPA drops the credentials block but returns service headers verbatim, so header values are redacted here and the names kept.

Category E: Higher-level helpers

The differentiation surface. These compose lower-level primitives into the tasks agents are actually asked to do.

Tool

What it does

rego_explain_decision

Turn an evaluation trace into a structured per-rule summary of what fired and what did not

rego_generate_test_skeleton

Given a policy, generate a _test.rego skeleton covering each rule.

rego_describe_policy

Summarize a policy's package, imports and per-rule structure from its AST. For the input references a policy reads, use rego_infer_input_schema

rego_suggest_fix

For a failed rego_check or rego_lint, propose fix suggestions with a confidence level.

rego_coverage_gaps

Run opa test --coverage and return per-file uncovered line ranges, sorted worst first. Use threshold to focus on files below a target percentage.

rego_security_audit

Run regal lint restricted to its bugs category, plus any custom rules in a security category, across a directory. Returns severity-grouped findings with remediation guidance.

rego_infer_input_schema

Statically analyse a policy (or directory of policies) with opa parse and return a JSON Schema describing every input.* field the policy reads. No running OPA required. Correct starting point for writing integration tests or configuring opa check --schema.

rego_fix

Run regal fix to auto-apply mechanical fixes: opa-fmt, use-rego-v1, use-assignment-operator, no-whitespace-comment, and directory-package-mismatch. Use dryRun: true to preview changes first. Returns a per-file breakdown of which rules were applied and, for directory-package-mismatch, the new path the file was moved to.

rego_format_write

Run opa fmt --write to canonically format one or more Rego files or directories in place. Use dryRun: true to list which files would change without modifying them. Validates all files parse successfully before writing any. Supports regoV1, v0Compatible, and v1Compatible flags. Only requires opa.

rego_policy_diff

Evaluate the same query against two policies in parallel and compare the results. Returns equal: true/false, the raw value from each side (resultA/resultB), and changedPaths -- dot/bracket JSON paths that differ. Each side takes inline source or a file/directory path. Useful for verifying refactor equivalence or mapping divergence between two policy versions.

rego_verify

Formally verify a property about a Rego rule using SMT solving (Microsoft Z3 via WASM). Unlike testing, this checks ALL possible inputs mathematically and either proves the property holds or returns a concrete counterexample. The kind field takes always_true, never_true or satisfiable. Handles equality, comparison, string built-ins (startswith, endswith, contains, regex.match), multi-clause rules, rule defaults, non-boolean head values, and cross-rule inlining. Reports INCONCLUSIVE rather than guessing for negation-as-failure, comprehensions, partial set and object rules, functions, else chains, and complex regex. A body reading an absent field is undefined rather than true, so always_true requires the rule to hold for an empty input too.

rego_explain_undefined

Explain why a Rego query is undefined. Combines a plain eval, a full-trace eval, and per-condition AST analysis to identify the exact body expression blocking each rule. Returns a structured breakdown of which conditions blocked each rule plus a human-readable summary.

rego_playground_share

Publish a policy (and optional input) as a secret GitHub Gist (pass public: true to list it) and return the link, for sharing a reproduction. Requires GITHUB_TOKEN with the gist scope; returns GITHUB_TOKEN_MISSING otherwise.

Category F: Conftest (configuration policy testing)

Test Kubernetes manifests, Terraform plans, Dockerfiles, Helm charts, and any YAML/JSON/HCL/TOML/INI against Rego policies using conftest. Requires conftest on PATH or CONFTEST_BINARY set; all four tools return CONFTEST_NOT_FOUND otherwise.

Tool

What it does

conftest_test

Evaluate config files or an inline document against Rego policies with conftest test. Per-file, per-namespace results with arrays always present, and a summary that counts files by name. Parser names are a closed set.

conftest_verify

Run the test_* rules in a conftest policy directory with conftest verify. Reports per-rule results and NO_TESTS_FOUND when there are none.

conftest_pull

Pull a policy bundle from an OCI registry or Git repo into a local directory with conftest pull. The target directory need not exist; conftest creates it, and empties it first, so do not point it at one holding anything else. Omitting policy uses the conftest default, which must itself sit inside an allowed root.

conftest_push

Package a local policy directory as an OCI artifact and push to a registry with conftest push. Registry credentials come from the host environment (docker login, ORAS keychain, etc.) -- credentials are never passed through tools.

// Input
{
  "inlineConfig": "apiVersion: v1\nkind: Pod\nspec:\n  containers:\n  - name: app\n    image: nginx:latest",
  "inlinePolicy": "package main\ndeny contains msg if { input.spec.containers[_].image == \"nginx:latest\"; msg := \"pin your image tag\" }"
}

// Output
{
  "ok": true,
  "data": {
    "passed": false,
    "results": [
      {
        "filename": "<inline>",
        "namespace": "main",
        "successes": 0,
        "failures": [{ "msg": "pin your image tag" }],
        "warnings": [],
        "skipped": [],
        "exceptions": []
      }
    ],
    "summary": {
      "passed": 0,
      "failed": 1,
      "warnings": 0,
      "skipped": 0,
      "successes": 0,
      "failures": 1
    }
  }
}

Category G: Meta

Tool

What it does

mcp_server_info

Return server name, version, resolved opa/regal/conftest versions, transport type, and Node.js version in one call. Useful for verifying which server instance the agent is connected to.

Prompts

Three MCP prompts ship with the server. Clients surface them as slash commands or workflow templates.

Prompt

Purpose

policy_authoring_assistant

Walks the agent through writing a new policy: ask about the decision surface, draft, review, format, lint, test.

policy_review_checklist

Review checklist for an existing policy: completeness, edge cases, performance, security pitfalls.

decision_debugging_workflow

Diagnostic flow when a decision is unexpected: gather input, run with explain, isolate the rule, propose a fix.

Resources

Three MCP resources expose curated reference data the agent can read at any time.

Resource URI

What's there

opa://builtins

Categorized OPA built-in function reference, derived at read time from opa capabilities --current. Security-sensitive functions (http.send, crypto.x509.*, opa.runtime) are flagged.

opa://style-guide

Condensed Rego style guide, formatted for LLM consumption.

opa://patterns

Curated common-pattern library: RBAC, ABAC, Kubernetes admission, IaC gates, API authz, rate limiting. Each pattern includes when-to-use, full Rego, a test, and common pitfalls.

Cookbook

A few session shapes that the tool set was designed for.

"Help me write a policy"

You: I need an authz policy: editors can read/write, viewers can only read,
     admins can do anything.

Agent: I'll draft it. (calls rego_format on a draft, then rego_check, then
       rego_lint)

Agent: Here's the policy. I've also generated a test file with cases for
       each role. (calls rego_generate_test_skeleton, then rego_test)

Agent: All 9 tests pass. Want me to save it to <path>?

"Why was this denied?"

You: This API call is being denied and I don't know why.
     [pastes input.json]

Agent: (calls rego_explain_decision against your local policy with that input)

Agent: The deny comes from rule `forbid_anonymous_writes` at line 17.
       Specifically, `input.user` is null and the request method is "POST".
       The rule fires, which causes the default deny. To allow this, you'd
       need either an authenticated user or a policy exception for this
       endpoint.

"Push this policy to staging OPA"

You: Push policies/rbac.rego to the staging OPA server, but first lint and
     test it.

Agent: (rego_lint → 2 style warnings, no errors)
       (rego_test on policies/ → all pass)
       (opa_put_policy with id="rbac" against $OPA_URL)
       (opa_get_policy to verify)

Agent: Done. Policy `rbac` is live on staging at $OPA_URL.

Architecture

┌──────────────────────────────────── @orygn/opa-mcp ───────────────────────────────────┐
│                                                                                       │
│   src/server.ts ──── McpServer (stdio) ─── tool / prompt / resource registries        │
│                          │                                                            │
│                          ├── tools/authoring/         ─┐                              │
│                          ├── tools/evaluation/        ─┤                              │
│                          ├── tools/bundles/           ─┼─── lib/opa-cli.ts ──┐        │
│                          ├── tools/server-management/ ─┤                     │        │
│                          ├── tools/helpers/           ─┤                     │        │
│                          ├── tools/conftest/          ─┤                     │        │
│                          ├── tools/meta/              ─┘                     │        │
│                          │                                                   ▼        │
│                          │                              lib/subprocess.ts ──┴── opa   │
│                          │                              lib/regal-cli.ts   ───── regal│
│                          │                              lib/conftest-cli.ts ─ conftest│
│                          │                              lib/opa-client.ts  ───── HTTP │
│                          │                                                            │
│                          └── lib/output.ts (envelope + truncation)                    │
│                              lib/security.ts (path allow-list)                        │
│                              lib/errors.ts (structured failures)                      │
│                              lib/logger.ts (file-only, never stdout)                  │
└───────────────────────────────────────────────────────────────────────────────────────┘

Four things worth knowing if you're going to operate this:

  1. stdout is the protocol channel. The server logs to a file via lib/logger.ts and never writes to stdout. If you see stray stdout bytes, the client disconnects; the MCP transport layer is strict.

  2. No tool handler throws. Every handler catches its own exceptions and returns a structured { ok: false, error: ... } envelope, so the agent sees a stable error vocabulary, not a stack trace. An argument that fails the tool's input schema never reaches the handler: the MCP layer rejects it and returns a tool result with isError: true whose text begins MCP error -32602: Input validation error:, rather than the envelope. Decoding subprocess output happens inside an async callback, where a throw would bypass those handlers entirely, so that path is bounded by bytes rather than left to a try/catch that could not see it.

  3. Subprocesses are bounded in time, size, and environment. lib/subprocess.ts runs the binaries with shell: false, a hard timeout with SIGTERM-then-SIGKILL escalation, and a per-stream byte cap. There is no path through the server where an agent can construct a shell command. The timeout alone is not enough: opa buffers a result in memory and writes it in one burst at exit, so a command that finishes well inside the timeout can still deliver hundreds of megabytes.

  4. Children do not inherit the server's environment. lib/child-env.ts builds an explicit allow-list instead. Rego can read its interpreter's environment through opa.runtime().env, so anything passed down is readable by any policy the server evaluates, the proxy variables on the list included.

Security

This server is designed to run locally, started by an MCP client on the user's own machine, communicating over stdio. It is not designed to be exposed on the network.

  • File-based tools refuse to read anything outside OPA_MCP_ALLOWED_PATHS. When that variable is unset, file tools return PATH_NOT_ALLOWED.

  • Subprocesses run with shell: false, a hard timeout, and a byte cap on captured output.

  • Evaluated policy cannot read the server's environment. Rego exposes the environment of the opa process through opa.runtime().env, so a child that inherited process.env would hand OPA_TOKEN, GITHUB_TOKEN, and every other variable to any policy it evaluated. Since rego_eval accepts inline source, no filesystem access is needed to reach that, which puts it one prompt injection away from any untrusted Rego an agent reads. Children get an explicit allow-list instead (lib/child-env.ts). The list holds no cloud or repository token, but it is not free of credentials: HTTP_PROXY and its siblings are on it, and a proxy URL can embed a username and password. They are there because dropping them breaks everyone behind a corporate proxy. Name them in OPA_MCP_BLOCK_ENV to withhold them anyway. OPA_MCP_PASSTHROUGH_ENV opts individual variables back in.

  • OPA_TOKEN is never echoed in tool responses or log entries, and is not passed to any child process.

  • Tools that evaluate Rego are annotated open-world and not read-only. rego_eval and its variants, rego_test, rego_test_multiroot, rego_bench, rego_compile_query, opa_exec, rego_migrate_v1 (when given inputs), the explain, diff and coverage helpers, the conftest tools, and the Regal tools (rego_lint, rego_security_audit, rego_fix, which run a project's custom rules) all run Rego, and OPA's http.send lets a policy reach, and write to, any network address. A client that gates on the hints will ask before running one. opa_query_decision and opa_compile_query are the exception: the remote OPA evaluates a policy it already holds, and their hints describe what the call does to that server. No evaluating tool passes or accepts a capabilities file, so http.send cannot be restricted for evaluation; rego_check and opa_bundle_build accept one, which affects only checking and building.

  • Releases are published with npm provenance; the Docker image is built from the committed Dockerfile, with pinned versions of opa and regal checked against their published digests.

To report a vulnerability, follow SECURITY.md. Please do not open a public issue for security problems.

Troubleshooting

Common issues, fast fixes.

OPA_BINARY_NOT_FOUND (or REGAL_NOT_FOUND / CONFTEST_NOT_FOUND) even though the binary is installed. (most common first-day issue, read this first)

MCP clients (notably Claude Desktop on Windows and macOS) launch the server with a deliberately reduced PATH that omits user-local bin directories, even ones that work fine in your interactive shell. The binary is on your machine; the spawned MCP server just can't see it.

Find the absolute path to opa:

# macOS / Linux
which opa
# → /usr/local/bin/opa  (or /opt/homebrew/bin/opa, or ~/.local/bin/opa)
# Windows
Get-Command opa | Select-Object -ExpandProperty Source
# → C:\Users\you\bin\opa.exe  (or wherever)

Then set OPA_BINARY to that absolute path in your client's MCP env block. The same cause and fix apply to the other binaries: if rego_lint / rego_security_audit / rego_fix report REGAL_NOT_FOUND, or the conftest_* tools report CONFTEST_NOT_FOUND, set REGAL_BINARY / CONFTEST_BINARY to the absolute path the same way (find it with which regal / which conftest). Having the binary on your shell PATH is not enough -- the spawned server gets a reduced PATH. The examples/ configs already include these env vars; just edit the placeholder paths.

This issue does not affect the Docker install path, which bundles opa and regal and bypasses PATH entirely. The MCPB bundle resolves opa from OPA_BINARY or PATH, so it can hit this.

The server starts, then the client says "disconnected."

The most likely cause is something in the process writing to stdout besides MCP frames. If you've added a custom tool, check that no library it calls prints to stdout. The fixed-position safety net is lib/logger.ts. Use it, not console.log.

PATH_NOT_ALLOWED on a file under my project.

OPA_MCP_ALLOWED_PATHS is empty by default. Set it to the absolute path(s) you want the server to read from, comma-separated.

OPA_UNREACHABLE when calling opa_* tools.

OPA_URL (default http://localhost:8181) must point at a running OPA server (opa run --server ...). Check with curl $OPA_URL/health.

TIMEOUT when calling opa_* tools.

The request did not finish within OPA_MCP_HTTP_TIMEOUT_MS (default 15 s). Either OPA is up but slow, or nothing is answering at OPA_URL and the connection attempt is being dropped rather than refused, which looks the same from here. Check OPA_URL and the server's load, or raise the limit.

directory-package-mismatch violation when linting inline source.

Since v0.1.1, the server auto-disables this rule for inline-source calls. If you see it, you are running an older version -- upgrade to v0.1.1 or later. To get canonical signal on this rule, lint via paths against the real on-disk file instead of passing source directly.

Where are the logs?

Default location is <OS-tmpdir>/orygn-opa-mcp.log. That's typically /tmp/orygn-opa-mcp.log on Linux/macOS or %TEMP%\orygn-opa-mcp.log on Windows. Set OPA_MCP_LOG_FILE to override, and OPA_MCP_LOG_LEVEL=debug to widen the firehose.

Development

git clone https://github.com/OrygnsCode/opa-mcp-server.git
cd opa-mcp-server
npm install
npm run dev

Common commands:

npm run lint              # ESLint
npm run typecheck         # tsc --noEmit
npm test                  # unit tests (Vitest)
npm run test:coverage     # unit + coverage report
npm run test:integration  # against real opa + regal binaries
npm run build             # compile to dist/

CI runs lint, typecheck, build, and unit tests on every push and PR across Ubuntu and Windows on Node 22, 24 and 26, plus macOS on Node 22. Integration tests run on Linux, and on Windows as a non-required check, against pinned opa, regal and conftest releases.

For the full contributor workflow (adding tools, naming conventions, logging discipline, release process), see CONTRIBUTING.md.

Versioning & support

This project follows Semantic Versioning. The public surface for SemVer purposes is the set of registered tools, prompts, and resources, their input/output schemas, the recognized environment variables, and the CLI entry point.

Breaking changes will be:

  • announced in CHANGELOG.md under a new major version,

  • preceded by at least one minor release with a deprecation warning,

  • accompanied by a migration note in the release announcement.

Pinned versions of the upstream toolchain (opa and regal) are treated as part of the build, not as a dependency the operator manages. The Dockerfile and CI use the same pin; bumps go through Dependabot or a manual PR.

License

MIT © Orygn LLC

@orygn/opa-mcp is an independent project. It is not affiliated with, endorsed by, or sponsored by the Open Policy Agent project, the Cloud Native Computing Foundation, Styra, or Anthropic. "Open Policy Agent" and "Rego" are trademarks of their respective owners. "Model Context Protocol" is a trademark of Anthropic, PBC.

Listed in the OPA Ecosystem.

Available Tools

52 tools
conftest_pullConftest pullA
DestructiveIdempotent

Download Rego policies from an OCI registry or Git repository into a local directory using conftest pull. Use this to hydrate a local policy/ directory before running conftest_test. Requires conftest on PATH or CONFTEST_BINARY set. The policy directory must be inside OPA_MCP_ALLOWED_PATHS. SECURITY: pulled policies are arbitrary Rego source that will be executed by conftest_test. Only pull from registries or repositories you own or explicitly trust -- malicious policy code can use OPA built-ins (http.send, opa.runtime) to exfiltrate data or make outbound network requests when the tests run.

ParametersJSON Schema
NameRequiredDescriptionDefault
urlYesPolicy URL to pull. Supported schemes: `oci://registry/repo:tag` (OCI registry), `github.com/org/repo//path` (GitHub subdirectory), `git::https://example.com/repo//path` (generic Git). See https://www.conftest.dev/sharing/ for the full URL syntax.
policyNoLocal directory where the pulled policies will be written. Must be inside an allowed root (OPA_MCP_ALLOWED_PATHS). Omitted, it falls back to `policy` in the working directory of the server process, the conftest convention, which must itself sit inside an allowed root. The directory is emptied before the pull, so do not point it at one holding anything you want to keep.

TDQS

A4.5/5.0
Behavior5/5

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

Beyond the annotations, the description discloses that the target directory is emptied before the pull, warns that pulled policies are arbitrary executable Rego with exfiltration/network risks, and notes the external binary dependency and path restrictions. This is substantial value added on top of destructiveHint and readOnlyHint.

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 front-loaded with the main action and each subsequent sentence covers a distinct aspect: use case, prerequisite, path constraint, and security warning. No filler or redundancy; the security warning earns its place.

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?

For a side-effectful tool with no output schema, the description covers purpose, prerequisites, destructive side effects, security implications, and path constraints. An agent has everything needed to decide whether to call it and to call it safely.

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?

With 100% schema description coverage, the schema already documents the url schemes and the policy directory fallback and emptying behavior. The tool description doesn't add new parameter-level meaning beyond restating that the policy directory must be inside allowed paths, so the baseline 3 is appropriate.

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 opens with a specific action: 'Download Rego policies from an OCI registry or Git repository into a local directory using conftest pull.' It identifies the resource, destination, and direction, and it distinguishes itself from the sibling conftest_push by direction and from conftest_test by sequencing ('hydrate ... before running conftest_test').

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?

It gives explicit usage context: 'Use this to hydrate a local policy/ directory before running conftest_test' and states prerequisites (conftest on PATH or CONFTEST_BINARY, OPA_MCP_ALLOWED_PATHS). It does not explicitly name an alternative to use instead, but the download-vs-push contrast and the sequencing with conftest_test provide clear context.

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

conftest_pushConftest pushA
Destructive

Package the local Rego policy directory as an OCI artifact and push it to a registry using conftest push. Registry credentials must be pre-configured in the host environment (docker login, ORAS keychain, etc.) -- this tool never handles credentials. The policy directory must be inside OPA_MCP_ALLOWED_PATHS. Requires conftest on PATH or CONFTEST_BINARY set.

ParametersJSON Schema
NameRequiredDescriptionDefault
policyNoPath to the local directory containing Rego policies to push. Must be inside an allowed root (OPA_MCP_ALLOWED_PATHS) and must exist. Omitted, it falls back to `policy` in the working directory of the server process, the conftest convention, which must itself sit inside an allowed root.
repositoryYesOCI repository URL to push policies to (e.g. `ghcr.io/my-org/policies:latest`). Registry credentials must already be configured in the host environment (via `docker login`, ORAS keychain, or REGISTRY_AUTH_FILE). This tool does not accept or store registry credentials.
v0CompatibleNoRead the policy as Rego v0 (`--v0-compatible`), the syntax OPA used before 1.0: rules without `if`, partial sets as `deny[msg] { ... }`. Needed for a policy that has not been migrated, which OPA 1.x otherwise refuses to load. Where the tool also takes a query, the query is read as v0 too, with the future keywords imported so `in`, `every` and `some x in` still work in it.

TDQS

A4.1/5.0
Behavior4/5

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

Annotations already flag this as destructive, non-idempotent and open-world, so the safety profile is covered. The description adds genuinely useful context beyond that: it never handles credentials, auth must pre-exist (docker login/ORAS keychain/REGISTRY_AUTH_FILE), and the allowed-paths sandbox constraint. It doesn't discuss overwrite behavior for an existing tag or failure modes.

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

Conciseness4/5

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

Three sentences, front-loaded with the action, followed by the two operational prerequisites. Every sentence earns its place, though it is slightly dense with environment requirements that could be trimmed.

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

Completeness4/5

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

For a remote-mutating tool with no output schema, the description covers the essentials an agent needs: authentication expectations, path sandboxing, and the required binary. It omits what a successful push returns and how an existing tag at the same repository is handled, which leaves a small gap.

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?

Schema description coverage is 100%, so the schema already documents `policy`, `repository` and `v0Compatible` in depth. The description reiterates the allowed-paths and credential constraints but adds no syntax or format detail the schema lacks; baseline 3 applies when the schema does the heavy lifting.

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?

States a specific verb and resource: packages a local Rego policy directory as an OCI artifact and pushes it via `conftest push`. This is clearly distinguishable from the pull-oriented sibling conftest_pull and from the bundle tools.

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?

Gives concrete preconditions for use: credentials must be pre-configured in the host environment, the policy directory must be inside OPA_MCP_ALLOWED_PATHS, and conftest must be on PATH or CONFTEST_BINARY set. It does not explicitly name a when-not or alternative tool, so it stops short of a 5.

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

conftest_testConftest testA

Evaluate configuration files (Kubernetes manifests, Terraform plans, Dockerfiles, Helm charts, or any YAML/JSON/HCL/TOML/INI) against Rego policies using conftest test. Returns per-file, per-namespace pass/fail/warn results so you can pinpoint exactly which policy rules fired. Requires conftest on PATH or CONFTEST_BINARY set; returns CONFTEST_NOT_FOUND otherwise. Provide config via files (disk paths) or inlineConfig (inline string). Provide policy via policy (disk path) or inlinePolicy (inline Rego source). Omit policy and inlinePolicy to use conftest's default ./policy directory. Policies are executed by conftest and can call OPA built-ins such as http.send.

ParametersJSON Schema
NameRequiredDescriptionDefault
dataNoPaths to directories from which additional data will be loaded for the Rego policies. Each path must be inside an allowed root.
filesNoFilesystem paths to configuration files to evaluate (YAML, JSON, HCL, Dockerfile, etc.). Each path must be inside an allowed root (OPA_MCP_ALLOWED_PATHS). Mutually exclusive with `inlineConfig`.
parserNoForce a specific parser for all input `files` via conftest's global `--parser` flag, overriding extension-based detection. Useful for files whose extension does not match their format (e.g. parse a `.tfstate` file as `json`). One of: cue, cyclonedx, dockerfile, dotenv, edn, groovy, hcl1, hcl2, hocon, ignore, ini, json, jsonc, jsonnet, nginx, properties, spdx, textproto, toml, vcl, xml, yaml. For `inlineConfig`, prefer `inlineConfigParser`.
policyNoPath to a directory or file containing Rego policies. Must be inside an allowed root (OPA_MCP_ALLOWED_PATHS). Mutually exclusive with `inlinePolicy`. Omit to let conftest use its default `./policy` directory.
combineNoCombine all configuration files into a single input document before evaluating. Useful when policies need to inspect relationships across multiple files.
namespaceNoRego namespace (package name) to test against. Defaults to `main`. Use `allNamespaces: true` to test all discovered namespaces instead.
failOnWarnNoReturn `passed: false` even when only warnings (no hard failures) are present.
inlineConfigNoInline configuration content to evaluate (e.g. a Kubernetes manifest as a YAML string). Mutually exclusive with `files`. Defaults to YAML format; set `inlineConfigParser` to override.
inlinePolicyNoInline Rego policy source. Written to a temporary directory and passed as `--policy`. The policy should declare `package main` (or match the `namespace` parameter). Mutually exclusive with `policy`.
v0CompatibleNoRead the policies as Rego v0 (`--rego-version v0`), the syntax before OPA 1.0: rules without `if`, `deny[msg] { ... }`. conftest reads v1 by default and refuses such a policy.
allNamespacesNoTest policies found in all discovered namespaces. Overrides `namespace`.
inlineConfigParserNoParser to use for `inlineConfig`. One of: cue, cyclonedx, dockerfile, dotenv, edn, groovy, hcl1, hcl2, hocon, ignore, ini, json, jsonc, jsonnet, nginx, properties, spdx, textproto, toml, vcl, xml, yaml. Defaults to yaml. Ignored when `files` is used (conftest infers the parser from each file's extension, unless `parser` is set).

TDQS

A4.6/5.0
Behavior5/5

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

With readOnlyHint=false and openWorldHint=true already declared, the description goes further: it discloses the binary prerequisite and failure mode, the mutual-exclusivity rules for policy/config sources, the default ./policy fallback, the per-file/per-namespace pass/fail/warn return shape, and that policies can invoke OPA built-ins like http.send (network egress).

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

Conciseness4/5

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

Front-loaded with the core action and return contract, then prerequisites and source-selection rules. It is dense and somewhat long for a description, but nearly every sentence carries non-schema information.

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?

For a 12-parameter, zero-required, no-output-schema tool, the description covers invocation prerequisites, input source selection, defaults, return structure, and execution environment. An agent has enough to call it correctly without opening the schema.

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

Parameters4/5

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

Schema coverage is 100%, so the baseline is 3; the description earns extra by spelling out the paired sources (`files` vs `inlineConfig`, `policy` vs `inlinePolicy`), the omit-policy default, and the parser/inlineConfigParser split. Most per-parameter detail, however, remains in the schema.

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?

Starts with a specific verb+resource ('Evaluate configuration files') and enumerates the accepted input formats, then names the underlying command. It also distinguishes itself from siblings like rego_test/conftest_verify by naming the conftest execution path and the file-vs-string input model.

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?

Explains when this applies (config files vs Rego policies) and states the prerequisite (`conftest` on PATH or `CONFTEST_BINARY`), plus the CONFTEST_NOT_FOUND outcome. It does not explicitly compare against siblings such as conftest_verify or rego_test, so no exclusions are given.

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

conftest_verifyConftest verifyA

Run the test_* rules inside *_test.rego files within a conftest policy directory, verifying that the policies themselves are correct. Equivalent to opa test but using conftest's policy-loading machinery. Returns per-file pass/fail results, and NO_TESTS_FOUND when the directory holds no test rules. Requires conftest on PATH or CONFTEST_BINARY set; returns CONFTEST_NOT_FOUND otherwise.

ParametersJSON Schema
NameRequiredDescriptionDefault
dataNoPaths to data directories. Each must be inside an allowed root (OPA_MCP_ALLOWED_PATHS).
policyNoPath to the directory containing both the Rego policies and the `*_test.rego` test files. Must be inside an allowed root (OPA_MCP_ALLOWED_PATHS). Omit to use conftest's default `./policy` directory.
namespaceNoNamespace to verify. Omit to verify all namespaces.
v0CompatibleNoRead the policies as Rego v0 (`--rego-version v0`), the syntax before OPA 1.0: rules without `if`, `deny[msg] { ... }`. conftest reads v1 by default and refuses such a policy.

TDQS

A3.7/5.0
Behavior4/5

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

Beyond the annotations (readOnlyHint=false, openWorldHint=true, which say nothing specific), it discloses concrete behavior: per-file pass/fail results, a NO_TESTS_FOUND sentinel for empty test sets, the external `conftest` dependency (PATH or CONFTEST_BINARY), and a CONFTEST_NOT_FOUND failure mode. This is genuinely useful operational context, though it omits what happens if a test itself errors mid-run.

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

Conciseness4/5

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

Four sentences, each carrying distinct information (what it runs, the opa-test equivalence, return values, dependencies), with the core purpose front-loaded. It is dense but not padded; the equivalence sentence could be tightened slightly but earns its place by anchoring expectations.

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

Completeness4/5

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

With no output schema, the description correctly steps in to describe return shape (per-file pass/fail, NO_TESTS_FOUND) and prerequisite/environment failure (CONFTEST_NOT_FOUND). For a 4-param, zero-required tool this is largely complete; the only gap is the unaddressed overlap with the conftest_test sibling.

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?

Schema description coverage is 100%, so the parameters (data, policy, namespace, v0Compatible) are already fully documented with constraints and allowed roots. The description adds only a passing reference to the policy directory and does not enrich parameter meaning beyond the schema, so the baseline 3 applies.

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

Purpose4/5

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

The description gives a specific verb and resource ('Run the `test_*` rules inside `*_test.rego` files within a conftest policy directory') and clarifies the goal is verifying the policies themselves. It is clear in isolation, but it never distinguishes itself from the very similar sibling conftest_test, so an agent cannot confidently route between them.

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

Usage Guidelines3/5

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

It implies usage by framing the tool as 'Equivalent to `opa test` but using conftest's policy-loading machinery', which hints at when to pick it over plain OPA tooling. However, it gives no explicit when-to-use/when-not, and says nothing about how it differs from conftest_test or the rego_test siblings, leaving the closest routing decision to inference.

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

mcp_server_infoMCP server infoA
Read-onlyIdempotent

Return the name, version, and runtime details of this opa-mcp server instance. Use this when you need to confirm which version of opa-mcp is running, or to verify that the OPA, Regal, and Conftest binaries are reachable.

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already indicate readOnlyHint=true, destructiveHint=false, etc. The description adds value by specifying what the tool returns (name, version, runtime details) and that it checks binary reachability. No contradiction with 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?

Two concise sentences: first states purpose, second provides usage guidance. No wasted words, front-loaded with key information.

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

Completeness4/5

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

The description covers return values (name, version, runtime details, binary status) adequately. No output schema, but the description provides sufficient context for a simple info tool. Minor gap: 'runtime details' is vague, but overall complete enough.

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

Parameters4/5

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

The tool has no parameters, and schema coverage is 100%. The description does not need to add parameter info. Baseline for 0 parameters is 4, and the description adds no unnecessary detail.

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 returns name, version, and runtime details of the opa-mcp server. The verb 'Return' and resource 'opa-mcp server instance' are specific. Among siblings which are mostly OPA/Conftest/Rego manipulation tools, this is the only info tool about the server itself, so differentiation is clear.

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 explicitly states two use cases: confirming the version of opa-mcp and verifying reachability of OPA, Regal, and Conftest binaries. While it doesn't mention when not to use it, the context is clear and no alternatives are needed as the tool is unique among siblings.

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

opa_bundle_buildBuild OPA bundleA
DestructiveIdempotent

Build a deployable bundle from policy / data paths using opa build. Output is a .tar.gz archive with optional inline signing. Supports optimization, custom revision strings, and the WASM target.

ParametersJSON Schema
NameRequiredDescriptionDefault
pathsYesPolicy / data paths to include. Each must be in an allowed root.
bundleNoLoad `paths` as bundle files or root directories (`--bundle`). Implied by `signingKey` and `verificationKey`; set it explicitly to rebuild an existing bundle without signing.
ignoreNoFile/directory name patterns to ignore during loading (`--ignore`), e.g. `[".*"]` to skip hidden files. These are name patterns, not filesystem paths.
outputYesOutput bundle path (typically `*.tar.gz`). Must be in an allowed root.
targetNoBuild target (default `rego`; `wasm` compiles to WebAssembly).
optimizeNoOptimization level (0 = none, 2 = aggressive).
revisionNoBundle revision string written to the manifest.
claimsFileNoPath to a claims file for inline signing.
signingAlgNoSigning algorithm (e.g. RS256).
signingKeyNoPath to a PEM private key for signing the built bundle (`--signing-key`). Implies `bundle: true`, which OPA requires for signing.
entrypointsNoEntrypoint refs (required when `target=wasm` or `optimize > 0`).
pruneUnusedNoExclude dependents of entrypoints that are not reachable from them (`--prune-unused`). Most useful alongside `entrypoints`.
capabilitiesNoPath to a capabilities JSON file.
v0CompatibleNoRead the policy as Rego v0 (`--v0-compatible`), the syntax OPA used before 1.0: rules without `if`, partial sets as `deny[msg] { ... }`. Needed for a policy that has not been migrated, which OPA 1.x otherwise refuses to load. Where the tool also takes a query, the query is read as v0 too, with the future keywords imported so `in`, `every` and `some x in` still work in it.
v1CompatibleNoOpt in to OPA v1.0-compatible behaviors (`--v1-compatible`). Affects the built bundle's runtime semantics.
verificationKeyNoPath to a PEM public key (or HMAC secret file) used to re-verify an existing signed bundle during the build (`--verification-key`). Implies `bundle: true`, which OPA requires for verification.
verificationKeyIdNoKey ID for verification (`--verification-key-id`, OPA default `default`).

TDQS

A3.7/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=false, destructiveHint=true, idempotentHint=true, so the write/overwrite profile is covered. The description adds useful context about the output artifact and inline signing, but does not disclose that an existing output file may be overwritten or that paths must fall within allowed roots beyond what the schema says.

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

Conciseness4/5

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

Three tight sentences, front-loaded with the core action and artifact. The trailing capability list is slightly list-like but still earns its place by signalling optimization/signing/WASM support up front.

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

Completeness4/5

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

For a build tool with no output schema, the description supplies the key missing piece an agent needs — the returned artifact type and that signing is optional — while the rich schema and annotations carry parameter and safety detail. Routing guidance versus sibling bundle tools is the only notable gap.

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?

Schema description coverage is 100% and the schema documents all 17 parameters in depth, so the baseline is 3. The description's mention of optimization, custom revision strings, and the WASM target echoes only a few of those parameters and adds little syntax or format detail beyond the schema.

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?

States a specific verb+resource ('Build a deployable bundle from policy / data paths using `opa build`') and names the output artifact (`.tar.gz` archive). This clearly distinguishes it from siblings like opa_bundle_sign and opa_bundle_verify, which operate on an existing bundle rather than producing one.

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

Usage Guidelines3/5

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

Usage is implied by the 'build' framing and the mention of signing/WASM targets, but the description never states when to reach for this tool versus opa_bundle_sign, opa_bundle_verify, or opa_put_policy. No prerequisites (allowed roots, signing key requirements) are stated outside the schema.

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

opa_bundle_signSign OPA bundleA
DestructiveIdempotent

Sign a bundle directory with opa sign. A directory is signed in place: .signatures.json is written into it and files are recorded as <directory name>/<file>, so the signed directory verifies wherever it is placed as long as its name is unchanged, with opa_bundle_verify or with opa build or opa run --bundle <name> from its parent. An archive is refused: OPA reads the signature from inside it, so a signed archive comes from opa_bundle_build with signingKey. The key is a PEM private key (RSA or ECDSA); for HMAC algorithms pass a file holding the secret. Extra claims such as keyid and scope come from claimsFile. Returns the path written, the algorithm, and the number of files covered.

ParametersJSON Schema
NameRequiredDescriptionDefault
bundleYesPath to a bundle directory. Must be inside an allowed root. An archive is refused, since OPA reads the signature from inside it; build a signed archive with `opa_bundle_build` and `signingKey`.
claimsFileNoPath to a JSON file of extra claims to sign, such as {"keyid": "...", "scope": "..."}. Must be inside an allowed root.
signingAlgNoSigning algorithm: RS256 (default), RS384, RS512, PS256, PS384, PS512, ES256, ES384, ES512, HS256, HS384, HS512.
signingKeyYesPath to the PEM private key (RSA or ECDSA), or for HMAC algorithms a file holding the secret. Must be inside an allowed root.

TDQS

A4.9/5.0
Behavior5/5

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

The description goes well beyond the annotations by disclosing the in-place mutation ('signed in place', `.signatures.json` is written), the naming scheme for recorded files, archive refusal, key-type constraints, and return values. These details align with `destructiveHint=true` and `idempotentHint=true` without contradicting them, and they compensate for the lack of an output schema.

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?

Although longer than typical tool descriptions, every sentence carries a distinct piece of information: action, side effects, archive exception, key details, claims, and return value. The most decision-relevant fact (archive refusal and `opa_bundle_build` route) is placed after the core mechanics, which is still well front-loaded and dense without padding.

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?

For a 4-parameter tool with no output schema, the description covers the operation, side effects, return payload, parameter specifics, and the important boundary case (archives). The only minor omission is behavior when `.signatures.json` already exists, but the `idempotentHint` annotation covers that, so nothing essential is missing.

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

Parameters4/5

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

The schema already documents all four parameters (100% coverage), so the baseline is 3. The description adds value on top by explaining that RSA/ECDSA keys are PEM files while HMAC algorithms expect a file holding the secret, and by spelling out what `claimsFile` should contain. This moves it to a 4.

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 opens with a specific verb+resource pair ('Sign a bundle directory with `opa sign`') and immediately differentiates from siblings by explaining it signs directories, not archives, and that signed archives come from `opa_bundle_build`. It also names `opa_bundle_verify` as the counterpart for verification, so an agent can distinguish it among the bundle-related tools.

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

Usage Guidelines5/5

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

Explicitly states that archives are refused and directs agents to `opa_bundle_build` with `signingKey` when a signed archive is needed. It also tells agents where the signed directory can be verified (`opa_bundle_verify`, `opa build`, `opa run --bundle`), making the tool's place in the workflow clear. No ambiguity about when to use this tool versus its bundle siblings.

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

opa_bundle_verifyVerify OPA bundle signatureA
Read-onlyIdempotent

Verify the signature of a signed bundle directory or .tar.gz archive with the public key. OPA has no standalone verify command, so this runs opa build --verification-key into a private temp file that is discarded. A directory is verified by name from its parent, matching how opa_bundle_sign signs it. OPA reads the key, checks the JWT in .signatures.json, compares the scope claim, then checks every file: Rego files by digest before parsing, data files and .manifest by parsed value, so an unparseable data file fails before its digest is compared. Failures return INVALID_BUNDLE with details.reason set to one of signature_invalid, scope_mismatch, file_modified, file_added, file_missing, file_unparseable, unsigned, signatures_malformed, not_a_bundle, bundle_load_error, or unknown when the message is not recognised; the raw output is in details. A key or algorithm OPA cannot use returns INVALID_INPUT. Pass scope exactly as the bundle was signed with. With a single key OPA does not check verificationKeyId against the signature keyid claim. verified: true is returned only when OPA loaded the bundle with its signature intact.

ParametersJSON Schema
NameRequiredDescriptionDefault
scopeNoExpected `scope` claim in the signature. Pass exactly the value the bundle was signed with, and nothing if it was signed without one; the failure reason is scope_mismatch otherwise.
bundleYesPath to the signed bundle directory or `.tar.gz` archive. Must be inside an allowed root.
signingAlgNoSigning algorithm used when the bundle was signed (e.g. `RS256`, `PS256`, `ES256`, `HS256`). Defaults to `RS256`.
v0CompatibleNoLoad the bundle as Rego v0 (`--v0-compatible`). A policy written before Rego v1 otherwise fails to load, after the signature and digests have already been checked.
verificationKeyYesPath to the PEM file containing the RSA or ECDSA public key, or for HMAC algorithms a file holding the secret. Must be inside an allowed root.
verificationKeyIdNoName the key is registered under for OPA (`--verification-key-id`, default `default`). With a single key OPA verifies against it regardless of the signature keyid claim, so this rarely needs setting.

TDQS

A4.6/5.0
Behavior5/5

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

Annotations already indicate read-only, idempotent, non-destructive behavior, and the description goes well beyond that by disclosing the temp-file mechanism, the file-by-file verification order, digest-vs-parsed-value differences, failure reason enumerations, and the precise condition for returning `verified: true`. It also surfaces the `verificationKeyId` nuance.

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

Conciseness4/5

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

The description is long but every sentence carries substantive behavioral or edge-case information for a complex tool. It is front-loaded with the core purpose and implementation, then proceeds into verification details and error conditions. Some schema repetition exists, such as the `scope` instruction, but overall it earns its length.

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 there is no output schema, the description thoroughly documents return behavior: `INVALID_BUNDLE` with an enumerated `details.reason`, `INVALID_INPUT` for unusable keys or algorithms, and the exclusive condition for `verified: true`. It also covers failure ordering, v0 compatibility, directory verification convention, and key-ID behavior, making the tool self-sufficient for correct invocation.

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

Parameters4/5

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

Schema coverage is 100%, so a baseline of 3 applies, but the description adds meaningful semantics: `scope` is emphasized as needing to match the signing value exactly, `v0Compatible` is tied to post-signature failure behavior, and `verificationKeyId` is explained as rarely needing to be set with a single key. This enriches the schema without being redundant.

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 opening sentence names a specific verb and resource: 'Verify the signature of a signed bundle directory or `.tar.gz` archive with the public key.' It also clarifies the implementation mechanism and the matching relationship to `opa_bundle_sign`, which distinguishes it from general Rego verification siblings like `rego_verify` and `conftest_verify`.

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 gives strong usage context: it explains that OPA has no standalone verify command, how the verification is performed, what inputs are required, and how `scope` must exactly match the signing value. It does not explicitly name alternative tools or say when not to use this tool, but the guidance is clear enough to invoke correctly.

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

opa_compile_queryCompile (partially evaluate) a query on OPAA
Read-onlyIdempotent

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.

ParametersJSON Schema
NameRequiredDescriptionDefault
inputNoOptional partial input document.
queryYesRego query to compile, e.g. "data.rbac.allow == true".
unknownsNoRefs to treat as unknown (default: ["input"]).

TDQS

A3.8/5.0
Behavior4/5

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

Annotations already provide readOnlyHint=true and idempotentHint=true. The description adds value by specifying the exact HTTP endpoint and explaining the concept of partial evaluation (substituting knowns). This provides behavioral context beyond annotations without contradiction.

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?

Two sentences efficiently deliver the action and result. No extraneous text. The first sentence is front-loaded with the verb 'compile' and endpoint, making it immediately actionable.

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

Completeness4/5

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

The description covers the tool's core behavior and return value (residual query) without an output schema. It assumes familiarity with OPA concepts but is sufficient for an agent. Could add more on use cases or prerequisites, but is adequate for the 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?

Schema coverage is 100% with clear descriptions for all three parameters. The tool description reinforces the purpose of partial evaluation but does not add new parameter-specific details beyond the schema. Baseline score of 3 is appropriate.

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 sends a query to the OPA server's /v1/compile endpoint for partial evaluation and returns the residual query. This distinguishes it from evaluation tools like rego_eval or opa_query_decision, showing 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 Guidelines2/5

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

The description does not explicitly state when to use this tool vs alternatives such as rego_eval or opa_query_decision. It only mentions partial evaluation but gives no guidance on scenarios or exclusions, leaving the agent to infer usage context from the tool name and siblings.

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

opa_configOPA configurationA
Read-onlyIdempotent

Return the running OPA server configuration from GET /v1/config. OPA drops the credentials block but returns services.*.headers verbatim, which is the ordinary place to put an API key or a bearer token, so those values are redacted here and the header names kept.

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

TDQS

A4.5/5.0
Behavior5/5

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

The description discloses non-obvious behavior well beyond the annotations: OPA drops the `credentials` block, returns `services.*.headers` verbatim, and redacts header values while keeping header names. This is exactly the kind of behavioral context that helps an agent anticipate the returned data and security implications.

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?

Two sentences, front-loaded with the core purpose and followed by a high-value behavioral caveat. Every clause earns its place; there is no redundant or filler content.

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?

This is a simple zero-parameter read operation. The description states what is returned, where it comes from, and the important redaction behavior. Annotations already convey read-only and idempotent safety. No critical information is missing for correct invocation.

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

Parameters4/5

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

The tool has zero parameters and the schema coverage is 100%, so there are no parameter semantics for the description to clarify. Per the rubric, a zero-parameter tool gets a baseline of 4.

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 uses a specific verb ('Return') and a precise resource ('the running OPA server configuration from `GET /v1/config`'). This clearly identifies what the tool does and separates it from sibling tools like opa_status or opa_health, which concern server health rather than configuration.

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

Usage Guidelines3/5

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

The use case is implied: if an agent needs the running OPA server configuration, this is the tool. However, the description does not explicitly state when to prefer this over alternatives or mention any exclusions, so guidance is present only by inference.

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

opa_delete_dataDelete a data document from OPAA
Destructive

Remove a document from OPA's data store at the given path. A path is read as dotted (users.alice) unless it contains a slash, in which case slash is the only separator (users/alice), so a key such as example.com is addressable as hosts/example.com. Pass segments instead when a key contains both. OPA responds with 204 No Content on success; if no document exists at the path, OPA returns 404 which is mapped to DATA_NOT_FOUND. Root-path deletion (/v1/data/ itself) is intentionally excluded -- supply at least one path segment.

ParametersJSON Schema
NameRequiredDescriptionDefault
pathNoData path to delete, e.g. "users.alice" or "users/alice". Must be at least one segment deep.
segmentsNoPath as literal key segments, e.g. ["labels", "app.kubernetes.io/name"]. Use instead of `path` when a key contains a dot or a slash.

TDQS

A4.8/5.0
Behavior5/5

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

Beyond the annotations (destructiveHint=true, idempotentHint=false), the description discloses the 204 success response, the 404-to-DATA_NOT_FOUND mapping, and the intentional root-path exclusion. These behaviors directly inform an agent about success, failure, and edge cases, which is exactly the kind of context annotations alone cannot provide.

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 information-dense but every sentence earns its place: the core action, path syntax rules, fallback parameter guidance, and edge-case behavior are all stated with no filler. The most important context is front-loaded and the formatting is easy to scan.

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?

For a two-parameter destructive operation with no output schema, the description is complete: it covers success codes, error mapping, path constraints, and the root-path edge case. The annotations already mark the destructive nature, and the description fills the remaining behavioral gaps an agent would need to safely invoke the tool.

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

Parameters5/5

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

Although the schema already covers 100% of parameters, the description adds crucial semantics: dotted vs slash-only path parsing, how to address keys containing dots or slashes, and when to switch from `path` to `segments`. This resolves ambiguous inputs that the schema descriptions only partially convey.

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 uses a specific verb ('Remove') with a clear resource ('document from OPA's data store') and the path-based scope. It naturally distinguishes itself from sibling tools like opa_delete_policy by explicitly targeting the data store rather than policy.

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 gives clear operational context: it explains when to use `path` vs `segments`, notes the root-path deletion exclusion, and requires at least one segment. It does not explicitly compare itself to alternative data-management tools like opa_patch_data or opa_put_data, but the conditional guidance is strong and the tool's purpose is unmistakable among siblings.

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

opa_delete_policyDelete OPA policyA
Destructive

Delete a policy by ID from the running OPA server.

ParametersJSON Schema
NameRequiredDescriptionDefault
idYesPolicy ID to delete.

TDQS

A3.6/5.0
Behavior3/5

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

Annotations already declare destructiveHint=true, making the delete behavior clear. The description adds minimal extra context ('from the running OPA server') but does not disclose potential side effects, authentication needs, or constraints beyond the schema.

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?

A single, front-loaded sentence with no wasted words. Every word is necessary and clear.

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

Completeness4/5

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

Given the simple one-parameter schema and no output schema, the description is mostly complete. However, it could mention error handling (e.g., policy not found) or that deletion is permanent, which would raise completeness to 5.

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?

Schema coverage is 100% with 'Policy ID to delete.' in the parameter description. The tool description adds no further meaning, meeting the baseline of 3.

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 action 'Delete', the resource 'a policy', and specificity 'by ID from the running OPA server'. This distinguishes it from sibling tools like opa_get_policy or opa_delete_data.

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

Usage Guidelines2/5

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

No guidance on when to use this tool vs alternatives (e.g., opa_put_policy to update) or prerequisites like ensuring the policy exists. The description only states the action without contextual usage advice.

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

opa_execBatch-evaluate OPA policy against input filesA

Evaluate a policy decision against one or more input files using opa exec --format=json. Unlike rego_eval (single input), opa exec processes every file independently and returns a per-file result -- ideal for CI pipelines that check many config files against a policy in one call. Supply bundle for a bundle, or dataPaths for plain .rego, JSON and YAML files and directories, which are loaded as opa eval --data loads them; the two are mutually exclusive. Each file that fails evaluation appears in results with an error field rather than a result field. Set one of fail/failDefined/failNonEmpty to turn the call into a CI gate: the result then reports failed: true (instead of erroring) when the gate condition is met.

ParametersJSON Schema
NameRequiredDescriptionDefault
failNoCI gate: report `failed: true` when any decision is undefined or errors. Mutually exclusive with `failDefined` and `failNonEmpty`.
bundleNoPath to an OPA bundle directory or `.tar.gz` archive to load as the policy source. Mutually exclusive with `dataPaths`.
timeoutNoPer-exec evaluation timeout as a Go duration, e.g. `"30s"` or `"5m"`. Still bounded by the server subprocess timeout (OPA_MCP_TIMEOUT_MS).
decisionYesThe policy entrypoint to evaluate for each input, e.g. `"authz/allow"`. `opa exec` names a decision by slash-separated path with no `data.` prefix; the Rego reference forms (`data.authz.allow`, `authz.allow`) are accepted here and converted, because passing one straight through leaves every file undefined.
dataPathsNoPolicy and data files or directories, loaded the way `opa eval --data` loads them: a `.rego` file as a module, a JSON or YAML file merged into the data root, a directory recursively, so every JSON and YAML file in it is data and must parse. One difference: a bundle archive (`.tar.gz`) inside a directory is not loaded, and `warnings` names it. A bundle given here directly (an archive, or a directory holding a `.manifest`) is loaded as a bundle; bundles and plain paths cannot be mixed. To load a directory as a bundle, reading only its `.rego` files and those named data.json, data.yaml or data.yml, pass it as `bundle`. Mutually exclusive with `bundle`.
inputPathsYesOne or more JSON/YAML input file paths, or a directory containing input files. OPA evaluates each file independently. Every path must be inside an allowed root.
failDefinedNoCI gate: report `failed: true` when any decision is defined or errors. Use when a defined result means a violation. Mutually exclusive with `fail` and `failNonEmpty`.
failNonEmptyNoCI gate: report `failed: true` when any decision result is non-empty or errors. Mutually exclusive with `fail` and `failDefined`.
v0CompatibleNoRead the policy as Rego v0 (`--v0-compatible`), the syntax OPA used before 1.0: rules without `if`, partial sets as `deny[msg] { ... }`. Needed for a policy that has not been migrated, which OPA 1.x otherwise refuses to load. Where the tool also takes a query, the query is read as v0 too, with the future keywords imported so `in`, `every` and `some x in` still work in it.
v1CompatibleNoOpt in to OPA v1.0-compatible behaviors (`--v1-compatible`).

TDQS

A4.8/5.0
Behavior5/5

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

Annotations are sparse (readOnlyHint=false, openWorldHint=true) so the description carries real weight, and it delivers: mutual exclusivity of bundle/dataPaths, per-file failure reporting ('appears in `results` with an `error` field rather than a `result` field'), and the gating semantics where errors become `failed: true` instead of throwing. Note the description frames the operation as pure evaluation while readOnlyHint=false implies otherwise, but the description never claims a read-only guarantee, so this is conservatism rather than a contradiction.

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

Conciseness4/5

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

Four dense sentences with no filler, ordered purpose → alternative → parameter relationships → gate behavior, so the most decision-relevant information is front-loaded. It runs long, but every clause maps to a real selection or invocation decision.

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

Completeness4/5

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

For a 10-parameter tool with no output schema, the description covers the essentials: which parameters are mutually exclusive, what the per-file result surface looks like (result vs error), and what the gate flags change. It stops short of describing the full success-result shape per file, which is the only remaining gap.

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

Parameters5/5

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

Schema coverage is 100%, so the baseline is 3, but the description goes beyond by explaining the relationship between `bundle` and `dataPaths` (mutually exclusive, loaded as `opa eval --data` would) and why the `decision` path form matters ('passing one straight through leaves every file undefined'). That is semantic framing the schema alone does not establish.

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?

Opens with a specific verb+resource ('Evaluate a policy decision against one or more input files using `opa exec --format=json`') and immediately scopes it against the closest sibling: 'Unlike `rego_eval` (single input), `opa exec` processes every file independently.' An agent can distinguish this from the many other eval tools without opening a schema.

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

Usage Guidelines5/5

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

Names the alternative (`rego_eval`) and the condition that selects this tool instead ('processes every file independently ... ideal for CI pipelines that check many config files against a policy in one call'). It also gives when-to-use guidance for the gate flags ('Set one of `fail`/`failDefined`/`failNonEmpty` to turn the call into a CI gate').

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

opa_get_dataRead data from OPAA
Read-onlyIdempotent

Read a path from OPA's data hierarchy. A path is read as dotted (users.alice) unless it contains a slash, in which case slash is the only separator (users/alice), so a key such as example.com is addressable as hosts/example.com. Pass segments instead when a key contains both.

ParametersJSON Schema
NameRequiredDescriptionDefault
pathNoData path under `data.`, e.g. "users" or "users/alice".
segmentsNoPath as literal key segments, e.g. ["labels", "app.kubernetes.io/name"]. Use instead of `path` when a key contains a dot or a slash.

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint, and destructiveHint, so the safety profile is covered. The description adds valuable behavioral detail about path interpretation: dotted notation versus slash-only separator, and how a key containing a dot can still be addressed. This goes beyond what annotations and schema alone provide.

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 three tightly written sentences with no filler. The core action is front-loaded, and the necessary path-format nuances are packed efficiently into the remaining sentences.

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

Completeness4/5

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

For a low-complexity read tool with strong annotations, the description is nearly complete. It covers the trickiest part: path formatting and segments selection. A minor gap is that it does not state what happens when neither `path` nor `segments` is provided, even though the schema allows zero required parameters.

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

Parameters5/5

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

With 100% schema description coverage, the baseline is 3, but the description substantially enriches parameter understanding. It clarifies the dotted-path rule, the slash-only fallback, the `example.com` addressing case, and the exact condition for using `segments` instead of `path`. This resolves real ambiguity in how to invoke the tool.

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 opens with 'Read a path from OPA's data hierarchy,' which names a specific verb, resource, and scope. This clearly differentiates it from siblings like opa_get_policy (policies) and opa_query_decision (decision evaluation) by targeting the data hierarchy specifically.

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

Usage Guidelines3/5

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

The description gives strong internal guidance on when to use `path` vs `segments`, but it never names alternative tools or states when this tool should be preferred over opa_get_policy or opa_query_decision. Tool-selection context is implied by 'data hierarchy' but not made explicit.

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

opa_get_policyGet OPA policy by IDA
Read-onlyIdempotent

Fetch a single policy by ID from the running OPA server. Returns the Rego source; the parsed AST is omitted unless asked for, since it is roughly forty times the size of the source it came from. Use rego_parse_ast on the source when an AST is what's wanted.

ParametersJSON Schema
NameRequiredDescriptionDefault
idYesPolicy ID, e.g. "rbac" or "policies/auth/main".
includeAstNoInclude OPA's parsed AST alongside the source. Off by default.

TDQS

A4.7/5.0
Behavior5/5

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

Annotations already declare readOnly/idempotent/non-destructive, so the bar for added context is lower. The description adds real behavior: the tool returns Rego source, omits the AST by default, explains the size tradeoff, and notes the includeAst alternative. No contradiction.

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?

Three sentences, all substantive, with the main purpose in the first clause. No filler or duplication of schema fields.

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?

For a simple one-required-parameter read tool, the description covers what the caller gets (Rego source), the optional behavior (includeAst), and the alternative for AST. Annotations cover safety and idempotency, and schema covers parameters, so nothing essential is missing.

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?

Schema coverage is 100%, so parameters are fully documented; the description adds little beyond what the schema already provides. The mention that AST is omitted 'unless asked for' aligns with includeAst's schema description, so no additional compensation is needed.

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?

Description opens with a specific verb+resource: 'Fetch a single policy by ID from the running OPA server.' It clearly scopes to one policy, distinguishes from list/put/delete siblings, and differentiates from rego_parse_ast by stating this returns Rego source and AST is optional.

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

Usage Guidelines5/5

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

Explicitly states that the AST is omitted unless asked and directs the agent to use `rego_parse_ast` when an AST is wanted, giving a concrete when-not. It also implies the primary use case—getting the Rego source for one policy—without ambiguity.

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

opa_healthOPA health checkA
Read-onlyIdempotent

Hit the OPA /health endpoint. A server that answers reports { healthy: true } on 200 and { healthy: false } with OPA's own reason otherwise, so an unactivated bundle is a health result rather than a tool error. OPA_UNREACHABLE means the server could not be reached at all. Supports bundles and plugins query flags to require those subsystems to also be healthy.

ParametersJSON Schema
NameRequiredDescriptionDefault
bundlesNoRequire bundle plugin to be healthy as well.
pluginsNoRequire all plugins to be healthy.

TDQS

A4.3/5.0
Behavior5/5

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

Annotations already cover the safe-read profile (readOnlyHint, idempotentHint, non-destructive), so the description's job was to add behavioral depth beyond that, and it delivers: the exact endpoint, 200-vs-otherwise result semantics, the key gotcha that an unactivated bundle yields { healthy: false } rather than a tool error, and the OPA_UNREACHABLE failure mode. These are precisely the interpretation cues an agent needs and cannot derive from annotations or the schema.

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?

Three sentences, roughly 70 words, with no filler. The endpoint is front-loaded, followed by result interpretation, the unreachable edge case, and finally the flags — a logical order where every sentence earns its place. Nothing is redundant with the schema or annotations.

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?

For a zero-required-param, read-only health check with no output schema, the description is fully sufficient: it names the endpoint, defines both success and failure result shapes, covers the edge cases (unactivated bundle, unreachable server), and documents both optional flags. There is nothing an agent needs in order to call this tool correctly that is missing.

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?

Schema description coverage is 100% — both bundles and plugins already carry adequate descriptions. The description's phrase 'query flags to require those subsystems to also be healthy' adds a small amount of meaning by tying the booleans to the subsystem-health concept, which aligns with and slightly reinforces the schema. Since the schema does the heavy lifting, the baseline 3 is appropriate.

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?

Names the specific resource (`/health` endpoint) with a clear verb ('Hit'), and then defines the expected response semantics. This makes the tool immediately distinguishable from the many siblings in the namespace, especially opa_status and opa_config, without needing to open their schemas.

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

Usage Guidelines3/5

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

The description conveys useful context about when to use the tool — checking whether the OPA server (and optionally its subsystems) is healthy — and clarifies that an unactivated bundle appears as a health result rather than a tool error, which affects result interpretation. However, it never explicitly names alternatives or gives when-to-use / when-not-to-use conditions, so routing among overlapping siblings like opa_status and opa_config is left to inference.

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

opa_list_policiesList OPA policiesA
Read-onlyIdempotent

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.

ParametersJSON Schema
NameRequiredDescriptionDefault
includeAstNoInclude 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.
includeSourceNoInclude each policy's Rego source. Off by default: fetch one policy with `opa_get_policy` rather than every policy at once.

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already cover the safety profile comprehensively (readOnlyHint=true, idempotentHint=true, openWorldHint=true, destructiveHint=false), so the bar for the description is lower. The description adds genuine behavioral value beyond annotations by disclosing the response-cap behavior: enabling either include flag can cause list responses to exceed the cap. This is exactly the kind of operational trait an agent needs to anticipate failure modes.

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?

Two sentences, zero filler. The first sentence front-loads the action and return value; the second handles the optional parameters and the reason for the defaults. Every clause earns its place.

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

Completeness4/5

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

For a simple listing tool with 0 required parameters, rich annotations, and no output schema, the description is nearly complete: it states the return value at a useful level ('policy IDs and a count') and explains both flags. It could marginally improve by describing the response envelope or ordering, but nothing an agent needs to invoke it correctly is missing.

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

Parameters4/5

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

Schema coverage is 100% with unusually rich per-parameter descriptions (size ratios, response-cap warnings, alternative-tool routing), which sets the baseline at 3. The description adds meaning on top by distinguishing the two flags at a semantic level — 'Rego text' vs 'parsed AST' — and stating the shared default-off behavior and its rationale, which is not fully redundant with the schema text.

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 states a specific verb and resource — 'List policies registered on the running OPA server' — and goes beyond that to specify the return value ('policy IDs and a count'). The phrase 'running OPA server' clearly differentiates this from the many rego_* sibling tools that operate on static policy files, and from opa_get_policy/opa_put_policy/opa_delete_policy which target individual policies.

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 provides clear context: use this to enumerate registered policies, and the optional include flags are discouraged by default because they 'push a list of any real size past the response cap.' This effectively tells an agent when NOT to set the flags. It does not explicitly name opa_get_policy as the alternative for fetching a single policy's source in the description body — that routing lives in the schema — so it stops just short of a 5.

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

opa_patch_dataPatch data on OPAA
Destructive

Apply a JSON Patch (RFC 6902) to the data document. Each operation is { op, path, value? }. Omit both path and segments to patch the root of the data hierarchy, which is how a whole new top-level document is added.

ParametersJSON Schema
NameRequiredDescriptionDefault
pathNoData path the patch is applied to.
segmentsNoPath as literal key segments, e.g. ["labels", "app.kubernetes.io/name"]. Use instead of `path` when a key contains a dot or a slash.
operationsYesArray of JSON Patch operations.

TDQS

A3.7/5.0
Behavior3/5

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

Annotations already indicate this is a destructive, non-idempotent write operation. The description adds useful behavioral context by explaining the operation format and that omitting path and segments patches the root to add a new top-level document. It does not go into further side effects, but the annotation covers the main destructive risk.

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 three sentences with no wasted words. It front-loads the core action, then gives the operation shape, then handles the important root-patch special case. Each sentence earns its place.

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

Completeness4/5

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

For a three-parameter tool with annotations covering the destructive nature and a schema covering all parameters, the description provides the remaining key context: how operations are structured and how to target the root. There is no output schema, but return-value details are not critical for invoking this tool correctly.

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

Parameters4/5

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

Schema description coverage is 100%, so the baseline is 3. The description adds value beyond the schema by clarifying the JSON Patch operation shape and the special root-patching behavior when both path and segments are omitted. This is meaningful parameter-level guidance an agent would not get from the schema alone.

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

Purpose4/5

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

The description clearly identifies the action: applying an RFC 6902 JSON Patch to the OPA data document. It names a specific verb and resource and is distinct from sibling tools like opa_put_data and opa_delete_data, though it does not explicitly differentiate itself from them in the description.

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

Usage Guidelines3/5

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

The description implies when this tool is useful by defining it as the JSON Patch mechanism for data, and it gives a concrete usage tip about omitting path/segments to patch the root. However, it does not explicitly state when to use this tool instead of alternatives such as opa_put_data or opa_delete_data.

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

opa_put_dataWrite data to OPAA
DestructiveIdempotent

Write or replace a value at the given data path. Body is sent as JSON. A path is read as dotted (users.alice) unless it contains a slash, in which case slash is the only separator (users/alice), so a key such as example.com is addressable as hosts/example.com. Pass segments instead when a key contains both.

ParametersJSON Schema
NameRequiredDescriptionDefault
pathNoData path to write to.
valueNoJSON value to store at this path.
segmentsNoPath as literal key segments, e.g. ["labels", "app.kubernetes.io/name"]. Use instead of `path` when a key contains a dot or a slash.

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already declare destructive and idempotent hints; the description adds non-obvious runtime behavior: the body is JSON, path separator parsing switches between dots and slashes, and dot-containing keys can be addressed via slash-separated paths. This is meaningful context beyond the 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?

Every sentence earns its place: purpose, body format, separator rule, and segments fallback. The most important verb-first statement is front-loaded and the paragraph is dense without padding.

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

Completeness4/5

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

The tricky path-encoding behavior is fully explained, and annotations cover the destructive/idempotent safety profile. There is no output schema and no response description, but for a write operation the essential calling requirements are covered.

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

Parameters4/5

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

Schema coverage is 100%, so baseline is 3, but the description elevates it by explaining how `path` is parsed, why `hosts/example.com` works, and when `segments` is the right parameter. It adds practical meaning not fully present in the schema's field descriptions.

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 states a specific action ('Write or replace a value') on a specific resource (OPA data path), which clearly distinguishes it from siblings like opa_patch_data and opa_delete_data. The 'replace' wording communicates full overwrite rather than merge or delete.

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

Usage Guidelines3/5

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

It gives useful in-tool guidance for choosing path versus segments, but it never addresses when to use opa_put_data instead of opa_patch_data or opa_delete_data. Tool-vs-alternative selection is therefore left mostly implicit.

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

opa_put_policyUpload or replace OPA policyA
DestructiveIdempotent

Upload a Rego policy under the given ID. Replaces any existing policy with that ID. The policy is uploaded as raw text/plain -- OPA parses it on the server side.

ParametersJSON Schema
NameRequiredDescriptionDefault
idYesPolicy ID to create or replace.
sourceYesRego source.

TDQS

A3.6/5.0
Behavior4/5

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

Annotations already indicate destructive and idempotent behavior. The description adds that the policy is uploaded as raw text/plain and parsed server-side, and that it replaces any existing policy with that ID, providing useful behavioral context 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.

Conciseness4/5

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

Two sentences, no redundant information. It is concise and front-loaded with the key action. Could potentially be structured as a brief paragraph but still efficient.

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

Completeness3/5

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

For a mutation tool with no output schema, the description covers core behavior (replace, raw text). However, it does not mention return values or error conditions, which would be helpful for completeness given the tool's destructive nature.

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?

Schema descriptions already define 'id' and 'source' adequately. The description adds that the source is raw text/plain, which is helpful but not extensive. With 100% schema coverage, the description does not significantly enhance parameter understanding.

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 verb 'Upload' and resource 'Rego policy' with a given ID. It distinguishes from sibling tools like opa_get_policy and opa_delete_policy by specifying the upload/replace action.

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

Usage Guidelines2/5

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

No guidance is provided on when to use this tool versus alternatives such as opa_put_data or opa_bundle_build. There is no mention of prerequisites or context where this tool is preferred.

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

opa_query_decisionQuery OPA decisionA
Read-onlyIdempotent

Evaluate a decision against the running OPA server. POSTs to the data path with {input} and returns whatever the rule produces. Use this to ask the server "given this input, what does data.X.allow say?"

ParametersJSON Schema
NameRequiredDescriptionDefault
pathNoDecision path under `data.`, e.g. "rbac/allow" or "rbac.allow".
inputNoInput document to evaluate against.
explainNoInclude a trace at the requested level.
metricsNoInclude metrics in the response.
segmentsNoPath as literal key segments, e.g. ["labels", "app.kubernetes.io/name"]. Use instead of `path` when a key contains a dot or a slash.

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already mark this as read-only, idempotent, and non-destructive. The description adds valuable behavioral context by specifying the POST method, the data-path endpoint, and that the response is 'whatever the rule produces'. It does not detail error or undefined-rule behavior, but the annotations lower the burden.

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 two sentences with no wasted words. It front-loads the action and endpoint, then gives a concrete example in the second sentence.

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

Completeness4/5

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

Without an output schema, the phrase 'returns whatever the rule produces' gives useful response expectations, and annotations cover the safety profile. The need to provide a path or segments is implied but not explicit, which is a minor gap given the schema hints.

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?

The schema already documents all five parameters with clear descriptions. The description reinforces the meaning of `path` and `input` through the data.X.allow example, but it does not add significant meaning beyond the schema, so the baseline of 3 is appropriate.

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 states a specific verb ('Evaluate'), a specific resource ('the running OPA server'), and the mechanism ('POSTs to the data path'). The quoted example, 'given this input, what does data.X.allow say?', clearly differentiates this from local evaluation siblings like rego_eval.

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?

It gives clear context for when to use this tool: querying a running OPA server with an input document. It implicitly distinguishes from local rego evaluation tools, but it does not explicitly name alternatives or state when not to use this tool.

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

opa_statusOPA statusA
Read-onlyIdempotent

Return the running OPA server configuration via GET /v1/config. Returns the same underlying document as opa_config but presented under a status key as a convenience for agents that want to check "what is running" rather than "what was the server configured with". The response includes bundle settings, decision-log settings, and plugin configuration as OPA reported them at startup. Service header values are redacted, since OPA returns them verbatim and a header is the ordinary place to put an API key.

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

TDQS

A4.9/5.0
Behavior5/5

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

Beyond the readOnlyHint/idempotentHint annotations, the description discloses meaningful behavioral details: the response reflects startup-reported configuration, includes bundle/decision-log/plugin settings, and service header values are redacted because they may contain API keys. This adds genuine transparency beyond what structured annotations already convey.

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?

Three sentences, each earning its place: the first states the action and endpoint, the second clarifies the difference from a sibling tool, and the third covers response contents and a security-relevant redaction. The description is front-loaded and compact with no filler.

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?

Although there is no output schema, the description compensates by enumerating response categories, clarifying the relationship to opa_config, and warning about redacted header values. For a zero-parameter read-only status tool, this is sufficient context for an agent to invoke it correctly and interpret its result.

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

Parameters4/5

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

There are zero parameters, so schema coverage is complete by definition and the description need not explain parameters. It still adds useful context about what the returned configuration document contains and the redaction policy, which is more than the empty schema provides. Baseline 4 is appropriate.

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 opens with a specific verb and resource ('Return the running OPA server configuration via GET /v1/config') and precisely distinguishes this tool from its sibling opa_config by noting the 'status' key presentation and the intent to check 'what is running' vs 'what was configured'. This gives an agent a clear, unambiguous purpose.

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

Usage Guidelines5/5

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

The description explicitly names the alternative tool opa_config and states the selection criterion: use this when the agent wants 'what is running' rather than 'what was the server configured with'. This is direct routing guidance with no ambiguity about when to prefer this tool.

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

rego_benchBenchmark Rego queryA

Benchmark a Rego query against a policy + input with opa bench. Returns statistical timing data: iterations, ns/op, and allocation counts. Use this to spot slow rules.

ParametersJSON Schema
NameRequiredDescriptionDefault
countNoNumber of times to repeat the benchmark (`--count N`). Defaults to OPA's built-in default of one. Above one, every repetition is returned in `runs`, `fastest` indexes the one the top-level figures come from, and `raw` is omitted since that document is in `runs`.
inputNoInline input document.
pathsNoPolicy / data paths to load. Each must be in an allowed root.
queryYesRego query to benchmark.
inputPathNoPath to a JSON input file.
v0CompatibleNoRead the policy as Rego v0 (`--v0-compatible`), the syntax OPA used before 1.0: rules without `if`, partial sets as `deny[msg] { ... }`. Needed for a policy that has not been migrated, which OPA 1.x otherwise refuses to load. Where the tool also takes a query, the query is read as v0 too, with the future keywords imported so `in`, `every` and `some x in` still work in it.

TDQS

A3.8/5.0
Behavior4/5

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

Annotations only declare readOnlyHint=false and openWorldHint=true, so the description carries most of the behavioral load. It discloses the underlying mechanism (`opa bench`) and the shape of the result (iterations, ns/op, allocation counts), which is genuinely useful for an agent that has no output schema. It does not mention execution cost, timeouts, or the fact that benchmarking repeatedly executes the policy.

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?

Three short sentences that are front-loaded with the action, then the return shape, then the reason to use it. No filler and nothing repeated from the schema.

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

Completeness4/5

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

No output schema exists, so the description must say something about returns, and it does summarize the statistical fields. The count>1 behavior (runs/fastest, omitted raw) is only explained in the schema's count parameter, leaving the description slightly thin for an agent sizing up results.

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?

Schema description coverage is 100% across all six parameters, so the schema already documents query, input, paths, count, inputPath, and v0Compatible in detail. The description adds no parameter-level meaning beyond what the schema supplies, which is the baseline-3 case.

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

Purpose4/5

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

States a specific verb (benchmark) and resource (a Rego query against a policy + input), names the underlying command (`opa bench`), and reports what comes back (iterations, ns/op, allocation counts). It does not explicitly name the nearest sibling (rego_eval_with_profile), so an agent must infer the distinction itself.

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

Usage Guidelines3/5

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

"Use this to spot slow rules" gives a motivating use case, which implies the performance-investigation context. There is no explicit when-not guidance and no mention of alternatives such as rego_eval_with_profile, so the agent must decide between them on its own.

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

rego_capabilitiesOPA capabilitiesA
Read-onlyIdempotent

Return OPA capabilities -- the available builtins, future keywords, features, and WASM ABI versions. With current: true, returns the running OPA's capabilities. With version: "v1.19.0", returns those of a specific version. With neither, lists available named versions. By default (names_only: true), returns only builtin names and count to stay within response size limits. Pass builtins: [...] for the full type signatures and documentation of a few named builtins; names_only: false returns every full record, which needs OPA_MCP_MAX_RESPONSE_BYTES raised above its default.

ParametersJSON Schema
NameRequiredDescriptionDefault
currentNoPrint the capabilities of the currently installed OPA. Mutually exclusive with `version`.
versionNoA specific OPA capabilities version (e.g. "v1.21.0"). When neither flag is set, lists available versions.
builtinsNoReturn the full record (type signature, documentation, metadata) for up to 100 builtin names, exact matches only. `matched` counts the records returned and names not found are listed under `missing`. When the records would not fit the response cap the tool returns OUTPUT_TOO_LARGE rather than a truncated result; ask for fewer names. Do not combine with `names_only: true`, which asks for the opposite.
names_onlyNoWhen true, or omitted, return only builtin names, count, future keywords, and features. The full payload for every builtin is larger than the default response cap (OPA_MCP_MAX_RESPONSE_BYTES), so `names_only: false` on its own needs that cap raised; use `builtins` to get full records for a few names instead.

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already establish readOnlyHint=true, idempotentHint=true, and destructiveHint=false. The description adds genuinely useful behavior beyond that: the default behavior (`names_only: true`), the response-size limitation rationale, the need to raise OPA_MCP_MAX_RESPONSE_BYTES for full records, and the OUTPUT_TOO_LARGE risk implied by the schema. Nothing contradicts the 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 front-loaded with the core purpose and then progresses logically through parameter modes, defaults, and caveats. Every sentence carries distinct information, and the length is justified by the four-parameter mode matrix. There is no filler or redundant restatement of the title.

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

Completeness4/5

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

Given there is no output schema, the description carries the burden of return-value clarity and does it well: it names the returned categories, explains the `count` and `matched`/`missing` behavior via the schema's `builtins` description, and warns about response-size limits. Minor gap: it does not describe the exact JSON shape of the non-builtin sections (e.g., fields for future keywords/features/WASM versions), but enough is stated for an agent to select and invoke the tool correctly.

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

Parameters4/5

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

Schema coverage is 100%, so the baseline is 3, but the description adds value beyond the schema by explaining the parameter interplay: the mutual exclusivity implied for `current`/`version`, the effect of omitting both, and the relationship between `builtins` and `names_only`. The schema already contains detailed per-parameter text, so the description does not need to repeat it all.

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 opens with a specific verb and resource: 'Return OPA capabilities' and enumerates exactly what is included ('available builtins, future keywords, features, and WASM ABI versions'). This clearly distinguishes it from the rego evaluation/parsing siblings, which operate on policies rather than OPA runtime capability metadata.

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 gives strong conditional guidance for each invocation mode ('With current: true...', 'With version: "v1.19.0"...', 'With neither...') and explains when to use `builtins` vs `names_only: false` based on response-size constraints. It does not explicitly name sibling alternatives, but no sibling tool offers this capability, so the mode-level guidance effectively covers when to use the tool.

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

rego_checkCheck RegoA
Read-onlyIdempotent

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.

ParametersJSON Schema
NameRequiredDescriptionDefault
pathsNoFilesystem paths to check. Each path must be inside an allowed root (OPA_MCP_ALLOWED_PATHS).
bundleNoLoad `paths` as bundle files or root directories (`--bundle`). Only valid with `paths`, not inline `source`.
sourceNoInline Rego source. Mutually exclusive with `paths`.
strictNoEnable strict mode -- fail on unused vars, deprecated builtins, etc.
maxErrorsNoMaximum number of errors to collect before `opa check` aborts compilation (`--max-errors`, OPA default 10). Raise it to surface more diagnostics from a badly broken policy in a single pass.
schemaDirNoSchema directory for input/data validation.
capabilitiesNoPath to a capabilities JSON file restricting allowed builtins.
v0CompatibleNoRead the policy as Rego v0 (`--v0-compatible`), the syntax OPA used before 1.0: rules without `if`, partial sets as `deny[msg] { ... }`. Needed for a policy that has not been migrated, which OPA 1.x otherwise refuses to load. Where the tool also takes a query, the query is read as v0 too, with the future keywords imported so `in`, `every` and `some x in` still work in it.

TDQS

A3.8/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint, and destructiveHint=false, so safety is covered. The description adds real value beyond that: it documents the return shape ('{ valid: true, errors: [] }') and the failure mode (structured diagnostics with file/line locations), which matters given no output schema exists.

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?

Three tight sentences with the core action, the return contract, and the input-mode choice front-loaded in that order. No filler or restated boilerplate.

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

Completeness4/5

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

With no output schema, the description correctly supplies the return contract, and annotations cover the safety profile while the schema covers all parameters. It is nearly complete; only the lack of sibling routing (check vs lint) leaves a minor gap.

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?

Schema description coverage is 100%, so every one of the 8 parameters is already documented in the schema, setting the baseline at 3. The description's only parameter-level addition is the source/paths mutual exclusivity, which the schema already states, so it adds little beyond the structured fields.

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

Purpose4/5

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

States a specific verb and resource ('Type-check Rego with `opa check`') plus the exact underlying command, which lets an agent separate it from rego_lint and rego_parse_ast. It does not explicitly name or contrast those siblings, so it falls short of full differentiation.

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

Usage Guidelines3/5

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

The description conveys the source-vs-paths usage pattern ('Provide either `source` for inline checking or `paths` for file/directory checking'), which is useful. However, it gives no guidance on when to reach for rego_check versus rego_lint, rego_compile_query, or rego_migrate_v1, so usage is only implied by the verb.

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

rego_check_schemaCheck Rego against a JSON SchemaA
Read-onlyIdempotent

Validate that a Rego policy's input.* field references are consistent with a JSON Schema using opa check --schema. Every field the policy reads from input must exist in the schema; mismatches surface as rego_type_error diagnostics with file/line locations. Returns { valid: true, errors: [] } when all references match the schema, or { valid: false, errors: [...] } with structured diagnostics when they do not. Accepts the schema inline (pass the schema output of rego_infer_input_schema directly as inlineSchema) or as a path to a JSON Schema file on disk, or to a schema directory when the policy declares schemas: annotations (schemaPath). Provide source for inline Rego or paths for file/directory checking.

ParametersJSON Schema
NameRequiredDescriptionDefault
pathsNoFilesystem paths to policy files or directories to validate. Each path must be inside an allowed root (OPA_MCP_ALLOWED_PATHS). Mutually exclusive with `source`.
sourceNoInline Rego source to validate against the schema. Mutually exclusive with `paths`.
strictNoEnable strict mode -- also fail on unused variables, deprecated builtins, and other non-fatal issues in addition to schema violations.
schemaPathNoPath to a JSON Schema file on disk to use for `input` validation, or to a schema directory when the policy carries `# METADATA` / `schemas:` annotations naming files in it (opa reads a directory only through those). Must be inside an allowed root (OPA_MCP_ALLOWED_PATHS). Mutually exclusive with `inlineSchema`.
inlineSchemaNoJSON Schema (draft-07) object describing the expected shape of the `input` document. Mutually exclusive with `schemaPath`. Accepts the `schema` field from `rego_infer_input_schema` output directly.
v0CompatibleNoRead the policy as Rego v0 (`--v0-compatible`), the syntax OPA used before 1.0: rules without `if`, partial sets as `deny[msg] { ... }`. Needed for a policy that has not been migrated, which OPA 1.x otherwise refuses to load. Where the tool also takes a query, the query is read as v0 too, with the future keywords imported so `in`, `every` and `some x in` still work in it.

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already cover the safety profile (readOnly/idempotent/non-destructive), and the description adds real value: it names the failure mode (rego_type_error diagnostics with file/line), and gives the exact return shape `{valid, errors}`. It doesn't discuss rate limits or path-root rejection errors beyond what the schema already says.

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

Conciseness4/5

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

Dense but well ordered: purpose first, then diagnostic/return behavior, then the schema-input modes, then source-vs-paths. Every sentence carries information, though the final sentence slightly stacks multiple mode descriptions.

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

Completeness4/5

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

For a 6-parameter, nested-object tool with no output schema, the description supplies the return contract and mode semantics the agent needs. Minor gaps remain around ordering when both none of source/paths are supplied, but overall it is complete enough to invoke correctly.

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

Parameters4/5

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

Schema coverage is 100%, so the baseline is 3, but the description adds integration meaning beyond the schema: it tells the agent it can pass `rego_infer_input_schema`'s `schema` output straight through as `inlineSchema`, and clarifies the directory-vs-file semantics of `schemaPath`.

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?

States a specific verb+resource+mechanism: validate a Rego policy's `input.*` references against a JSON Schema via `opa check --schema`. This clearly distinguishes it from siblings like rego_check, rego_lint, and rego_infer_input_schema.

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?

Explains the two schema-input modes (inline via rego_infer_input_schema output, or path/directory) and the source-vs-paths choice, giving clear usage context. It does not, however, explicitly state when to prefer this over rego_check or rego_verify, so no full when-not framing.

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

rego_compile_queryPartially evaluate a Rego queryA

Run partial evaluation on a query -- substitute known values and return the residual policy. Defaults unknowns to ["input"] (treat input as unknown), so the residual encodes "given input X, this is what would have to be true." Use this for offline policy slicing or pre-computing decision sets.

ParametersJSON Schema
NameRequiredDescriptionDefault
inputNoInline input document.
pathsNoPolicy / data file or directory paths. Each must be inside an allowed root.
queryYesRego query to evaluate, e.g. "data.example.allow".
sourceNoInline Rego policy source. Optional: without `source` or `paths` the query runs on its own, which is enough to try a built-in or an expression.
partialNoRun partial evaluation rather than full evaluation.
unknownsNoRefs to treat as unknown during partial evaluation.
inputPathNoPath to a JSON input file. Mutually exclusive with `input`.
v0CompatibleNoRead the policy as Rego v0 (`--v0-compatible`), the syntax OPA used before 1.0: rules without `if`, partial sets as `deny[msg] { ... }`. Needed for a policy that has not been migrated, which OPA 1.x otherwise refuses to load. Where the tool also takes a query, the query is read as v0 too, with the future keywords imported so `in`, `every` and `some x in` still work in it.
strictBuiltinErrorsNoTreat builtin errors as fatal instead of returning undefined.

TDQS

A4.1/5.0
Behavior4/5

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

Annotations declare readOnlyHint=false and openWorldHint=true; the description goes beyond them by disclosing the default of `unknowns` (`["input"]`) and the meaning of the residual output. It does not address the surprising non-read-only annotation for what reads as a pure computation, but it adds genuine behavioral context.

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?

Two sentences, front-loaded with the core operation and followed immediately by the key default and the intended use case. No filler; every clause carries information.

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

Completeness4/5

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

With 9 params, 100% schema coverage and no output schema, the description covers purpose, the critical default, and the use case well. Return values are described only at a high level ('residual policy'), which is acceptable given the absence of an output schema.

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

Parameters4/5

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

Schema coverage is 100%, so the baseline is 3. The description adds value the schema does not: the default value and interpretation of `unknowns` and what the residual encodes, which is the single most important parameter behavior for this tool.

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

Purpose4/5

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

The description names a precise operation ('Run partial evaluation on a query'), explains the mechanic (substitute known values, return the residual policy), and contrasts implicitly with plain evaluation via the `partial` semantics. It does not explicitly name a sibling (e.g. rego_eval or opa_compile_query), so the agent must infer differentiation.

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?

It gives concrete use cases -- 'offline policy slicing or pre-computing decision sets' -- which is clear when-to-use guidance. It stops short of stating when NOT to use it or naming an alternative evaluation tool, so it is not a 5.

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

rego_coverage_gapsRego test coverage gapsA

Run opa test --coverage and return a per-file breakdown of uncovered line ranges. Identifies which rules or branches are not yet exercised by tests. Files are sorted by coverage ascending so the worst-covered files appear first. Use threshold to limit the report to files below a target coverage percentage.

ParametersJSON Schema
NameRequiredDescriptionDefault
pathsYesTest directories or files. opa test looks for *_test.rego siblings of source files.
thresholdNoReport only files below this coverage percentage (0-100). When omitted, all files with uncovered ranges are reported.
runPatternNoRun only tests whose names match this regex.
v0CompatibleNoRead the policy as Rego v0 (`--v0-compatible`), the syntax OPA used before 1.0: rules without `if`, partial sets as `deny[msg] { ... }`. Needed for a policy that has not been migrated, which OPA 1.x otherwise refuses to load. Where the tool also takes a query, the query is read as v0 too, with the future keywords imported so `in`, `every` and `some x in` still work in it.

TDQS

A3.5/5.0
Behavior3/5

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

Annotations declare readOnlyHint=false and openWorldHint=true, so the safety profile is at least partly covered. The description adds useful behavioral detail (per-file breakdown, ascending sort order) but says nothing about cost, side effects of executing test code, or prerequisite test files, which matters given readOnlyHint=false.

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

Conciseness4/5

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

Four tight sentences, front-loaded with the core action and outcome, then sort behavior and the threshold hint. No filler or redundancy, though the last sentence slightly duplicates the schema's threshold text.

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

Completeness4/5

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

With no output schema, the description does its job by characterizing the return value (per-file uncovered line ranges, sorted worst-first). It omits what happens when no tests exist or when paths contain no matching *_test.rego files, but it is otherwise sufficient for correct invocation.

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?

Schema description coverage is 100%, so the schema already documents all four parameters, including threshold and v0Compatible. The description restates threshold semantics and the sort behavior but adds no format, syntax, or edge-case detail beyond what the schema provides. Baseline 3 applies.

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

Purpose4/5

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

States a specific verb and resource: runs `opa test --coverage` and returns per-file uncovered line ranges, identifying unexercised rules/branches. Clear to an agent. However, it never distinguishes itself from close siblings like rego_test or rego_eval_with_coverage, leaving differentiation implicit.

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

Usage Guidelines3/5

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

The only usage guidance is 'Use threshold to limit the report to files below a target coverage percentage', which is parameter mechanics rather than when-to-use. There is no statement of when to pick this over rego_test, rego_test_multiroot, or rego_eval_with_coverage, so selection is left to inference.

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

rego_depsRego dependency analysisA
Read-onlyIdempotent

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.

ParametersJSON Schema
NameRequiredDescriptionDefault
refYesReference to compute dependencies for, e.g. "data.example.allow".
pathsYesPolicy / data paths to load before computing dependencies. Each must be inside an allowed root (OPA_MCP_ALLOWED_PATHS).

TDQS

A4/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true and idempotentHint=true, so the description's mention of 'static analysis' adds context but does not disclose additional behavioral traits like performance or side effects beyond what annotations provide.

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, well-structured sentence that front-loads the purpose and key details. No redundant information.

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

Completeness4/5

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

Despite no output schema, the description explains what the tool returns (base and virtual document references, transitively). It covers purpose, parameters, and output sufficiently for a static analysis tool.

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

Parameters4/5

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

Schema coverage is 100%, baseline 3. The description adds meaning by explaining the ref format (e.g., 'data.example.allow') and the paths constraint (must be inside allowed root), which adds value beyond the schema descriptions.

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 performs static dependency analysis for a Rego reference, specifying the target ref format and what it returns (base and virtual document references). This distinguishes it from sibling tools like rego_check or rego_eval.

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

Usage Guidelines3/5

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

The description implies usage for dependency analysis but does not explicitly state when to use this tool versus alternatives like rego_eval or rego_explain_decision. No when-not or alternative guidance is provided.

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

rego_describe_policyDescribe Rego policyA
Read-onlyIdempotent

Parse a Rego policy and return a structured summary: package, imports, and rules. Each rule reports clauseCount (how many definitions share the name), isDefault (true if any clause is a default), hasArgs, bodyLength (total body expressions across all clauses), and inline annotations. Useful as the first step in any "what does this policy do" workflow.

ParametersJSON Schema
NameRequiredDescriptionDefault
sourceYesRego source to describe.
v0CompatibleNoRead the policy as Rego v0 (`--v0-compatible`), the syntax OPA used before 1.0: rules without `if`, partial sets as `deny[msg] { ... }`. Needed for a policy that has not been migrated, which OPA 1.x otherwise refuses to load. Where the tool also takes a query, the query is read as v0 too, with the future keywords imported so `in`, `every` and `some x in` still work in it.

TDQS

A3.7/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint and destructiveHint=false, so safety is covered; the description adds valuable context by spelling out the exact report structure (clauseCount, isDefault, hasArgs, bodyLength, inline annotations). It does not mention error behavior for malformed source, a minor gap.

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

Conciseness4/5

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

Three front-loaded sentences: purpose first, then return-field detail, then a usage cue. The field enumeration is dense but each clause earns its place by clarifying output for a tool without an output schema.

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

Completeness4/5

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

With no output schema, the description usefully documents return shape and both parameters are covered by the schema, so an agent has enough to call it correctly. It lacks explicit sibling routing, which is the main missing piece.

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?

Schema description coverage is 100%, so the baseline is 3; both `source` and the rich `v0Compatible` explanation are already fully documented in the schema, and the description adds no additional parameter meaning.

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

Purpose4/5

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

States a specific verb (describe/parse) and resource (Rego policy), then enumerates the returned summary fields (package, imports, rules, clauseCount, isDefault, hasArgs, bodyLength). It is unambiguous what it does, though it does not explicitly contrast itself with near-siblings like rego_parse_ast or rego_inspect.

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

Usage Guidelines3/5

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

"Useful as the first step in any 'what does this policy do' workflow" implies a usage context, but there are no explicit when-to-use/when-not conditions or named alternatives among the many sibling analysis tools (rego_inspect, rego_parse_ast, rego_check).

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

rego_evalEvaluate Rego queryA

Evaluate a Rego query against a policy and an input document using opa eval. Returns the standard {result: [...]} shape. The bread-and-butter authoring tool. The policy is optional, so a query alone tries out a built-in or an expression. Pass inputs to evaluate one query against many input documents in one call, and v0Compatible for a policy still written in pre-1.0 Rego.

ParametersJSON Schema
NameRequiredDescriptionDefault
inputNoInline input document.
pathsNoPolicy / data file or directory paths. Each must be inside an allowed root.
queryYesRego query to evaluate, e.g. "data.example.allow".
inputsNoSeveral input documents to evaluate the same query against, up to 50, in place of `input`/`inputPath`. The result is `batch`: one entry per input, in order, each holding that input's `result` (empty when the query was undefined for it) or an `error`. An input that fails at runtime does not stop the others. A policy that does not compile fails the call, and after an input times out the inputs not yet started come back as `NOT_EVALUATED`.
sourceNoInline Rego policy source. Optional: without `source` or `paths` the query runs on its own, which is enough to try a built-in or an expression.
partialNoRun partial evaluation rather than full evaluation.
unknownsNoRefs to treat as unknown during partial evaluation.
inputPathNoPath to a JSON input file. Mutually exclusive with `input`.
v0CompatibleNoRead the policy as Rego v0 (`--v0-compatible`), the syntax OPA used before 1.0: rules without `if`, partial sets as `deny[msg] { ... }`. Needed for a policy that has not been migrated, which OPA 1.x otherwise refuses to load. Where the tool also takes a query, the query is read as v0 too, with the future keywords imported so `in`, `every` and `some x in` still work in it.
strictBuiltinErrorsNoTreat builtin errors as fatal instead of returning undefined.

TDQS

A3.6/5.0
Behavior4/5

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

Annotations declare readOnlyHint=false and openWorldHint=true, so the safety profile is partially covered; the description adds real value beyond them by disclosing the return shape (`{result: [...]}`), the pre-1.0 Rego compatibility path, and the fact that a query can run with no policy at all. It does not restate or contradict the annotations.

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

Conciseness4/5

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

Four compact sentences, front-loaded with what the tool does and the return shape before the optional-parameter notes. The colloquial "bread-and-butter authoring tool" is a slight indulgence but it conveys routing value cheaply.

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

Completeness3/5

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

For a 10-parameter tool with no output schema, the description usefully supplies the return shape and the headline behaviors, so the essentials an agent needs to call it are present. What is missing is disambiguation from the large cluster of near-identical eval/query siblings, which the description never addresses.

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?

Schema description coverage is 100%, so the schema already documents all 10 parameters thoroughly, including the batch semantics of `inputs` and the v0 rationale for `v0Compatible`. The description's parameter remarks (policy optional, `inputs` for many documents, `v0Compatible` for pre-1.0 policies) largely duplicate the schema text, so baseline 3 is appropriate.

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

Purpose4/5

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

States a specific verb and resource ("Evaluate a Rego query against a policy and an input document using `opa eval`") and calls itself the "bread-and-butter authoring tool," which positions it as the default entry point. It never names a specific sibling (rego_eval_with_explain, rego_eval_with_profile, rego_eval_with_coverage, opa_query_decision), so an agent must infer the distinction from the surrounding tool list.

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

Usage Guidelines3/5

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

Gives implied usage context: policy is optional so a bare query works for built-ins/expressions, and `inputs` enables batching one query against many documents. There are no exclusions and no explicit routing to the decorated eval variants (explain/profile/coverage) that share almost the same job, which is the main decision an agent faces here.

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

rego_eval_with_coverageEvaluate Rego with coverageA

Evaluate with --coverage and return per-line coverage data. Useful for verifying that tests actually exercise the rules they're meant to.

ParametersJSON Schema
NameRequiredDescriptionDefault
inputNoInline input document.
pathsNoPolicy / data file or directory paths. Each must be inside an allowed root.
queryYesRego query to evaluate, e.g. "data.example.allow".
sourceNoInline Rego policy source. Optional: without `source` or `paths` the query runs on its own, which is enough to try a built-in or an expression.
partialNoRun partial evaluation rather than full evaluation.
unknownsNoRefs to treat as unknown during partial evaluation.
inputPathNoPath to a JSON input file. Mutually exclusive with `input`.
v0CompatibleNoRead the policy as Rego v0 (`--v0-compatible`), the syntax OPA used before 1.0: rules without `if`, partial sets as `deny[msg] { ... }`. Needed for a policy that has not been migrated, which OPA 1.x otherwise refuses to load. Where the tool also takes a query, the query is read as v0 too, with the future keywords imported so `in`, `every` and `some x in` still work in it.
strictBuiltinErrorsNoTreat builtin errors as fatal instead of returning undefined.

TDQS

A3.5/5.0
Behavior3/5

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

Annotations give only readOnlyHint=false and openWorldHint=true, so the description carries most of the behavioral burden. It discloses the return content (per-line coverage data), which is genuinely useful without an output schema, but says nothing about cost, performance, or what happens under partial evaluation. Notably readOnlyHint=false for an eval tool is odd, though the description neither confirms nor contradicts it.

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?

Two tight sentences with the distinguishing behavior (coverage) front-loaded and the rationale following. Zero wasted words.

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

Completeness3/5

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

With nine parameters, sparse annotations, and no output schema, the description is thin for a tool whose headline output is coverage data. It states that per-line coverage is returned but does not characterize that shape or note anything about partial/unknowns interaction, leaving the schema and agent inference to fill sizable gaps.

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?

Schema description coverage is 100%, so the schema already documents all nine parameters, including partial/unknowns and v0Compatible in notable detail. The description adds only the implicit `--coverage` flag mapping and no syntax or format guidance beyond the schema, so baseline 3 applies.

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

Purpose4/5

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

States a specific verb+resource: 'Evaluate with `--coverage` and return per-line coverage data.' This clearly separates it from the plain `rego_eval` and from the explain/profile variants. It never names a sibling explicitly, but the coverage framing is distinctive enough for an agent to select it.

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

Usage Guidelines3/5

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

Provides an implied when-to-use: 'verifying that tests actually exercise the rules they're meant to.' That is real context, but there is no when-not guidance and no routing to related siblings like rego_coverage_gaps, rego_test, or rego_eval_with_explain.

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

rego_eval_with_explainEvaluate Rego with execution traceA

Evaluate with --explain=full and return a structured trace alongside the result. Use this when an agent needs to see why a rule fired (or didn't) -- the trace is the basis for rego_explain_decision.

ParametersJSON Schema
NameRequiredDescriptionDefault
inputNoInline input document.
pathsNoPolicy / data file or directory paths. Each must be inside an allowed root.
queryYesRego query to evaluate, e.g. "data.example.allow".
sourceNoInline Rego policy source. Optional: without `source` or `paths` the query runs on its own, which is enough to try a built-in or an expression.
partialNoRun partial evaluation rather than full evaluation.
unknownsNoRefs to treat as unknown during partial evaluation.
inputPathNoPath to a JSON input file. Mutually exclusive with `input`.
v0CompatibleNoRead the policy as Rego v0 (`--v0-compatible`), the syntax OPA used before 1.0: rules without `if`, partial sets as `deny[msg] { ... }`. Needed for a policy that has not been migrated, which OPA 1.x otherwise refuses to load. Where the tool also takes a query, the query is read as v0 too, with the future keywords imported so `in`, `every` and `some x in` still work in it.
strictBuiltinErrorsNoTreat builtin errors as fatal instead of returning undefined.

TDQS

A4.2/5.0
Behavior4/5

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

Annotations only cover readOnlyHint=false and openWorldHint=true, so the description's disclosure that this runs with full explain mode and returns a trace alongside the result is meaningful added context. It doesn't describe trace verbosity/size or how the trace is structured, but the core behavioral trait is surfaced.

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?

Two tightly written sentences with the core action front-loaded and no filler. The chained-tool note is brief and earns its place as routing context.

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

Completeness4/5

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

For a 9-parameter evaluation tool with no output schema, the description conveys the essential behavior (trace returned with result) and the workflow purpose. It could say more about what the returned trace contains, since no output schema exists to compensate, but it is sufficient to call the tool correctly.

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?

Schema description coverage is 100%, so all nine parameters (including the `--explain`-relevant ones like `partial`, `unknowns`, `v0Compatible`) are already documented in the schema. The description adds no parameter-level meaning beyond what the schema provides, which is the expected baseline.

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?

States a specific verb and resource (evaluate Rego with `--explain=full` returning a structured trace) and names the differentiator versus plain evaluation. It also positions the tool relative to a sibling (`rego_explain_decision`), so an agent can distinguish it without opening any schema.

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?

"Use this when an agent needs to see why a rule fired (or didn't)" is an explicit, actionable trigger condition, and it hints at the downstream relationship with `rego_explain_decision`. It stops short of stating when to prefer plain `rego_eval` over this costlier variant (e.g. when no explanation is needed), so no exclusions are given.

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

rego_eval_with_profileEvaluate Rego with profilingA

Evaluate with --profile and return per-rule timing and evaluation counts. Use this to find hot rules in slow policies.

ParametersJSON Schema
NameRequiredDescriptionDefault
inputNoInline input document.
pathsNoPolicy / data file or directory paths. Each must be inside an allowed root.
queryYesRego query to evaluate, e.g. "data.example.allow".
sourceNoInline Rego policy source. Optional: without `source` or `paths` the query runs on its own, which is enough to try a built-in or an expression.
partialNoRun partial evaluation rather than full evaluation.
unknownsNoRefs to treat as unknown during partial evaluation.
inputPathNoPath to a JSON input file. Mutually exclusive with `input`.
v0CompatibleNoRead the policy as Rego v0 (`--v0-compatible`), the syntax OPA used before 1.0: rules without `if`, partial sets as `deny[msg] { ... }`. Needed for a policy that has not been migrated, which OPA 1.x otherwise refuses to load. Where the tool also takes a query, the query is read as v0 too, with the future keywords imported so `in`, `every` and `some x in` still work in it.
strictBuiltinErrorsNoTreat builtin errors as fatal instead of returning undefined.

TDQS

A3.6/5.0
Behavior3/5

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

Annotations declare readOnlyHint=false and openWorldHint=true, and the description does not contradict them. It adds useful behavioral context by stating the output shape (per-rule timing and evaluation counts) rather than a plain decision result. It does not mention cost/overhead of profiling, path-root restrictions, or interplay with partial evaluation.

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?

Two short sentences with zero filler; the capability is front-loaded and the usage hint follows. Nothing could be removed without losing information.

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

Completeness4/5

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

For a 9-parameter tool with no output schema, the description discloses what profiling returns (timings plus counts) and when to reach for it, which covers the main gaps. It omits return-format specifics and any caveat about profiling cost, so it is good but not fully complete.

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?

Schema description coverage is 100% across all 9 parameters, so the schema already carries parameter meaning. The description adds no parameter-level detail (e.g. that profiling is meaningless without paths/source). Baseline 3 applies when the schema does the heavy lifting.

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

Purpose4/5

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

States a specific verb (evaluate) plus the distinguishing artifact: `--profile` mode returning per-rule timing and evaluation counts. This differentiates it from plain rego_eval and from the explain/coverage variants without naming them explicitly. It is clear but stops short of sibling-level routing.

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

Usage Guidelines3/5

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

"Use this to find hot rules in slow policies" gives a genuine use case, so usage is more than merely implied. However, it names no alternative and gives no exclusions, which matters here because rego_eval, rego_eval_with_explain, rego_eval_with_coverage and rego_bench all overlap and an agent must choose among them.

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

rego_explain_decisionExplain Rego decisionA

Evaluate a Rego query with full tracing and return a structured trace plus per-rule fired/not-fired summary. Use this when you need to answer "why was this denied?" -- the agent reads the structured trace and narrates the cause without re-implementing the trace parser.

ParametersJSON Schema
NameRequiredDescriptionDefault
inputNoInline input document.
pathsNoPolicy / data file or directory paths. Each must be inside an allowed root.
queryYesRego query to evaluate, e.g. "data.example.allow".
sourceNoInline Rego policy source. Optional: without `source` or `paths` the query runs on its own, which is enough to try a built-in or an expression.
partialNoRun partial evaluation rather than full evaluation.
unknownsNoRefs to treat as unknown during partial evaluation.
inputPathNoPath to a JSON input file. Mutually exclusive with `input`.
v0CompatibleNoRead the policy as Rego v0 (`--v0-compatible`), the syntax OPA used before 1.0: rules without `if`, partial sets as `deny[msg] { ... }`. Needed for a policy that has not been migrated, which OPA 1.x otherwise refuses to load. Where the tool also takes a query, the query is read as v0 too, with the future keywords imported so `in`, `every` and `some x in` still work in it.
strictBuiltinErrorsNoTreat builtin errors as fatal instead of returning undefined.

TDQS

A3.5/5.0
Behavior3/5

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

Adds genuine context beyond annotations by describing the return shape and the intended agent workflow (read trace, narrate cause, no custom parser). With annotations limited to readOnlyHint=false/openWorldHint=true, it still omits any disclosure of tracing cost, side effects, or why the call is flagged non-read-only.

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

Conciseness4/5

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

Two well-formed sentences, front-loaded with what the tool does followed by when to use it. No filler; only lightly redundant restatement of the output in the second clause.

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

Completeness4/5

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

For a 9-parameter, no-output-schema tool, the description compensates by naming the return contents (structured trace, per-rule fired/not-fired summary) and the intended usage. Behavioral specifics like tracing performance and the non-read-only flag remain unaddressed, keeping it short of full completeness.

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?

Schema description coverage is 100%, so the schema already documents all 9 parameters (v0Compatible, partial, unknowns, etc.). The description adds no format/syntax detail beyond the schema, so the baseline of 3 is appropriate.

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

Purpose4/5

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

States a specific verb+resource (evaluate a Rego query with full tracing) and its distinctive output (structured trace + per-rule fired/not-fired summary), which separates it from plain rego_eval. It does not, however, name the close siblings (rego_eval_with_explain, rego_explain_undefined) that an agent must choose between.

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

Usage Guidelines3/5

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

Provides a clear motivating scenario ('why was this denied?'), which implies when to reach for it. But it gives no explicit exclusions or alternatives, and with near-identical siblings like rego_eval_with_explain and rego_explain_undefined present, the agent is left to infer the routing.

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

rego_explain_undefinedExplain why a Rego query is undefinedA

Diagnose why a fully-qualified Rego query (e.g. "data.authz.allow") produces no value, or falls back to its default. Combines a plain eval, a full-trace eval, and per-condition AST analysis to identify the exact body expression blocking each rule. Handles both runtime failures (trace-based) and indexer elimination (standalone condition eval). A rule written with default allow := false always has a value, so queryResult reports default for it and the same per-rule breakdown follows: the question "why is allow false" is the question this answers. Returns a structured breakdown of which conditions blocked each rule plus a human-readable summary.

ParametersJSON Schema
NameRequiredDescriptionDefault
inputNoInput document (JSON value) for the query.
pathsNoPolicy .rego file paths to load. Mutually exclusive with source.
queryYesFully-qualified rule reference to explain, e.g. "data.authz.allow". Must match the path you would pass to rego_eval.
sourceNoInline Rego source to analyse. Mutually exclusive with paths.
inputPathNoPath to an input JSON file.
v0CompatibleNoRead the policy as Rego v0 (`--v0-compatible`), the syntax OPA used before 1.0: rules without `if`, partial sets as `deny[msg] { ... }`. Needed for a policy that has not been migrated, which OPA 1.x otherwise refuses to load. Where the tool also takes a query, the query is read as v0 too, with the future keywords imported so `in`, `every` and `some x in` still work in it.

TDQS

A3.7/5.0
Behavior4/5

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

With annotations marking this readOnlyHint=false and openWorldHint=true, the bar is lower, and the description adds real context: it combines three analysis passes, covers both runtime failures (trace-based) and indexer elimination (standalone condition eval), and explains how `default` rules are reported via `queryResult`. It also states the return shape (structured breakdown plus a human-readable summary), which matters because there is no output schema. It does not explain why the tool is flagged non-read-only, a minor omission.

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

Conciseness4/5

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

Front-loaded with the core purpose and mechanism, and most sentences carry information. The middle sentence about `default allow := false` and `queryResult` is convoluted and ends on a tautology ('the question ... is the question this answers'), which is the one place that does not earn its space.

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

Completeness4/5

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

For a 6-parameter diagnostic tool with no output schema, the description does the necessary work: it explains the two failure classes handled and summarizes the return payload. It stops short of describing behavior when the query is actually defined (does it error, return empty, or succeed silently), which an agent would want to know before calling.

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?

Schema description coverage is 100% and the description largely restates it (fully-qualified query, defaults, v0 compatibility is covered in the schema). It adds only marginal param meaning, e.g. the requirement that the query path match what you would pass to rego_eval. Baseline 3 is correct when the schema carries the documentation burden.

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

Purpose4/5

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

The description states a specific verb (diagnose/explain) and a precise resource/scope: a fully-qualified Rego query that produces no value or falls back to a default. It further distinguishes the scenario from a generic eval by describing the mechanism (plain eval + full-trace + per-condition AST analysis). It does not, however, name the nearby siblings it must be distinguished from (rego_eval_with_explain, rego_explain_decision), so an agent must infer the boundary.

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

Usage Guidelines3/5

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

Usage is implied rather than stated: the tool is for the case where a query is undefined or returns a default. There is no explicit 'when not to use this' or a named alternative such as rego_eval or rego_explain_decision for the case where the query does produce a value. The awkward restatement that 'why is allow false' is the question this answers adds scenario color but not routing guidance.

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

rego_fixAuto-fix Rego violationsA
Destructive

Run regal fix to automatically apply mechanical fixes. Regal 0.42 fixes opa-fmt, use-rego-v1, use-assignment-operator, no-whitespace-comment, directory-package-mismatch, non-raw-regex-pattern, prefer-equals-comparison, redundant-existence-check and constant-condition; older releases fix a subset. Use dryRun: true to preview changes before modifying files. NOTE: directory-package-mismatch moves files to match their package path -- use disable: ["directory-package-mismatch"] to skip it. Regal before 0.41 refuses files with uncommitted git changes unless force: true. Requires regal.

ParametersJSON Schema
NameRequiredDescriptionDefault
forceNoOn Regal before 0.41, allow fixing files that have uncommitted git changes; those releases refuse them otherwise. Regal 0.41 removed that check, and the flag is not sent to it.
pathsYesPolicy files or directories to fix. Each must be inside an allowed root (OPA_MCP_ALLOWED_PATHS).
dryRunNoPreview what would be fixed without modifying any files. Recommended before the first real run.
enableNoEnable specific fix rules.
disableNoDisable specific fix rules. Useful to skip directory-package-mismatch if you do not want files moved.
configFileNoPath to a Regal config file (.regal/config.yaml).
ignoreFilesNoGlob patterns to exclude from fixing.
enableCategoryNoEnable all rules in a category.
disableCategoryNoDisable all rules in a category.

TDQS

A4.5/5.0
Behavior5/5

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

Annotations already flag destructive behavior; the description adds crucial specifics: directory-package-mismatch moves files, Regal before 0.41 refuses uncommitted changes unless force:true, and regal must be installed. No contradiction with annotations.

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

Conciseness4/5

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

Dense but well-structured: main action first, then rule list, then critical safety caveats. Every sentence adds necessary information; the directory-package-mismatch warning is essential for a destructive tool.

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

Completeness4/5

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

For a destructive tool with 9 parameters and no output schema, the description covers the key behavioral caveats (file moves, git check, dryRun preview, regal requirement). It doesn't explain return values, but that's not critical for a fix command, and the schema handles parameter details.

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

Parameters4/5

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

Schema covers all 9 parameters at 100%, so baseline is 3. The description adds value by explaining the behavior behind dryRun, disable, and force in context (preview, skip file moves, version-specific git check), going beyond the schema's per-parameter descriptions.

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?

States the exact command ('Run regal fix') and the resource ('Rego violations') with a specific list of mechanical fixes. The title and description together make it clear this applies fixes rather than just reporting them, distinguishing it from rego_lint and rego_format.

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?

Provides clear operational guidance: dryRun for preview, disable for directory-package-mismatch, force for older Regal. It does not explicitly name sibling alternatives or state when not to use it, but the context is strong.

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

rego_formatFormat RegoA
Read-onlyIdempotent

Format Rego source code using opa fmt. Returns the formatted source and a changed flag indicating whether the input was already canonical. When the source uses string interpolation ($"..." or $... syntax) and OPA v1.12.0 or v1.12.1 is detected, the tool warns about or blocks formatting due to a known OPA bug that corrupts { escape sequences (fixed in OPA v1.12.2).

ParametersJSON Schema
NameRequiredDescriptionDefault
sourceYesRego source code to format.
v0CompatibleNoFormat a policy written in pre-1.0 Rego as pre-1.0 Rego (`--v0-compatible`), leaving its syntax as it is. OPA 1.x otherwise refuses it. To convert it to Rego v1 instead, use `rego_migrate_v1`.

TDQS

A3.8/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true, idempotentHint=true, and destructiveHint=false. The description adds useful behavioral context by explaining the `changed` flag and the OPA v1.12.0/v1.12.1 bug warning/blocking behavior. The phrase 'warns about or blocks' is slightly ambiguous, but it still discloses an important edge case beyond the 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 two sentences with no filler. It front-loads the core purpose, then covers return behavior and the notable OPA bug edge case. Every sentence earns its place.

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

Completeness4/5

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

The description explains the return value (`formatted source` and `changed` flag) and the important version-specific bug behavior, which is sufficient for most calls. It is slightly incomplete because it does not clarify the distinction from `rego_format_write` and leaves the warn-vs-block behavior ambiguous, but overall it covers the key operational details.

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?

Schema description coverage is 100%, so the schema already documents both `source` and `v0Compatible` clearly. The tool description adds no additional parameter-level meaning beyond what the schema provides, so the baseline score of 3 is appropriate.

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

Purpose4/5

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

The description clearly states the tool formats Rego source code using `opa fmt` and returns the formatted source plus a `changed` flag. This is a specific verb+resource and is easy to understand, but it does not explicitly distinguish itself from the sibling `rego_format_write` or other formatting-related tools.

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

Usage Guidelines3/5

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

The description implies usage for formatting Rego source, and the `v0Compatible` parameter description explicitly routes conversion to Rego v1 to `rego_migrate_v1`. However, there is no general guidance on when to choose this tool over `rego_format_write`, `rego_fix`, or other alternatives, so usage context is only partially addressed.

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

rego_format_writeFormat Rego files in placeA
DestructiveIdempotent

Run opa fmt --write to canonically format one or more Rego files or directories in place. Use dryRun: true to preview which files would change without modifying them. Returns a list of files that were (or would be) reformatted. Unlike rego_format which returns formatted source as a string, this tool writes directly to disk. Supports regoV1, v0Compatible, and v1Compatible flags for version-specific formatting. If any file cannot be parsed, the operation is aborted and no files are written.

ParametersJSON Schema
NameRequiredDescriptionDefault
pathsYesPolicy files or directories to format in place. Each must be inside an allowed root (OPA_MCP_ALLOWED_PATHS).
dryRunNoPreview which files would be reformatted without modifying them. Recommended before the first real run.
regoV1NoFormat module(s) to be compatible with both Rego v1 and the current OPA version. Adds `import rego.v1` where missing.
v0CompatibleNoUse OPA behaviors and syntax prior to the v1.0 release.
v1CompatibleNoUse OPA v1.0-compatible behaviors.

TDQS

A4.4/5.0
Behavior4/5

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

Annotations declare destructiveHint=true and idempotentHint=true. Description adds details: writes to disk, dryRun preview, abort on parse failure. No contradiction.

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?

Concise, front-loaded with main action, then key features (dryRun, return value, sibling differentiation, flags, error behavior). Every sentence adds value.

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

Completeness4/5

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

For a mutation tool with 5 params and no output schema, description covers return format, error behavior, version flags, and safety. Could mention idempotency or permissions, but redundant with annotations.

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

Parameters4/5

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

Schema coverage is 100%. Description adds meaning: paths must be within allowed root, dryRun for preview, regoV1 adds import rego.v1, v0Compatible/v1Compatible for version-specific formatting.

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?

Clearly states the tool runs `opa fmt --write` to format Rego files in place. Distinguishes from sibling `rego_format` by noting this writes to disk vs returning a string. Lists version flags.

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?

Explicitly recommends using `dryRun: true` for preview and distinguishes from `rego_format`. Mentions abort on parse failure. Could explicitly state when not to use, but differentiation is sufficient.

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

rego_generate_test_skeletonGenerate Rego test skeletonA
Read-onlyIdempotent

Generate a *_test.rego skeleton from a policy. Parses the AST, finds each non-test rule, and emits one stub test per rule. Existing test_* and todo_test_* rules are skipped automatically -- only production rules get stubs, and a value rule whose head is computed gets a todo_test_ stub, which opa test reports as skipped until its expected value is filled in and it is renamed test_. The AST is walked to infer which input.* fields the policy accesses; the inferred shape is used as the placeholder with input as {...} in each stub, so the developer only needs to fill in realistic values rather than guess the structure. With tableStyle: true, each stub uses an every tc in cases { ... } loop so you can add multiple input/expected pairs without duplicating assertion code. The inferredInputShape field in the response shows the detected shape for reference.

ParametersJSON Schema
NameRequiredDescriptionDefault
sourceYesRego source to generate tests for.
tableStyleNoGenerate table-driven test stubs instead of single-case stubs. Each rule gets a `cases` array and an `every tc in cases { ... }` assertion loop. Pair with `rego_test varValues: true` to see which case failed.
v0CompatibleNoRead the policy as Rego v0 (`--v0-compatible`). The stubs are still written with `import rego.v1`, which a v0 test run (`rego_test` with `v0Compatible`) accepts too.

TDQS

A4.6/5.0
Behavior5/5

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

Annotations already declare readOnly/idempotent/non-destructive, yet the description goes well beyond them: it discloses stub-skipping semantics, the `todo_test_` -> `test_` rename workflow and how `opa test` reports it as skipped, AST-based `input.*` inference feeding the `with input as {...}` placeholder, and the response's `inferredInputShape` field. This is rich behavioral context an agent cannot get from structured fields.

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

Conciseness4/5

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

Front-loaded with the core purpose, then layers on skip behavior, input-shape inference, tableStyle, and the response field. It is dense but every sentence carries distinct information; slightly long but no obvious filler.

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?

No output schema exists, yet the description names the relevant return field (`inferredInputShape`) and explains the generated artifact's structure. For a read-only generator with three fully-described params, nothing an agent needs to call it correctly is missing.

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

Parameters4/5

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

Schema coverage is 100%, so baseline is 3, but the description adds real meaning: `tableStyle` is explained as an `every tc in cases { ... }` loop with a cross-reference to `rego_test varValues: true`, and `v0Compatible` semantics (stubs still emit `import rego.v1`) are clarified. It adds value beyond the schema's parameter list.

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?

States a specific verb and artifact ('Generate a `*_test.rego` skeleton from a policy') and immediately scopes it against sibling tools by describing what is generated (stub tests per non-test rule) versus run. An agent can distinguish it from rego_test/rego_test_multiroot without opening a schema.

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?

Clearly describes the generation context (skips existing `test_*`/`todo_test_*` rules, emits `todo_test_` for computed-head value rules) and explains when to use `tableStyle` (multiple input/expected pairs). It does not explicitly name alternative sibling tools or state exclusions, so it stops short of a 5.

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

rego_infer_input_schemaInfer input schemaA
Read-onlyIdempotent

Statically analyse one or more Rego policies and return a JSON Schema (draft-07) object describing every input.* field the policies read. Uses opa parse for AST-level analysis -- no running OPA server required. Correct starting point for writing integration tests, configuring opa check --schema validation, or documenting a policy API. Accepts inline source, individual files, or directories (walked recursively for *.rego files).

ParametersJSON Schema
NameRequiredDescriptionDefault
pathsNoPolicy files or directories to analyse. Each must be inside an allowed root (OPA_MCP_ALLOWED_PATHS). Directories are walked recursively for *.rego files.
sourceNoInline Rego source to analyse. Mutually exclusive with paths.
v0CompatibleNoRead the policy as Rego v0 (`--v0-compatible`), the syntax OPA used before 1.0: rules without `if`, partial sets as `deny[msg] { ... }`. Needed for a policy that has not been migrated, which OPA 1.x otherwise refuses to load. Where the tool also takes a query, the query is read as v0 too, with the future keywords imported so `in`, `every` and `some x in` still work in it.

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already declare readOnly/idempotent/non-destructive/closed-world, so the safety profile is covered. The description usefully adds behavioural context beyond that: analysis is AST-level via `opa parse` with no running OPA server required (a real differentiator from opa_exec-style tools), and input may be inline source, individual files, or recursively walked directories. It omits failure behaviour on malformed Rego and any path-root error handling.

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

Conciseness4/5

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

Four sentences, front-loaded with the core verb-resource-output and then the usage guidance and input modes; nothing is padding. Slightly dense -- the usage sentence could be trimmed -- but every clause contributes.

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?

With no output schema, the description correctly carries the return-value burden by specifying a draft-07 JSON Schema describing every input.* field read. Combined with the input-mode coverage and the existing annotations, an agent has everything needed to invoke this correctly.

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?

Schema description coverage is 100%, so the schema already documents `paths`, `source`, and the fairly intricate `v0Compatible` flag. The description restates the source/file/directory modes but adds no detail the schema lacks, and never mentions v0Compatible. Baseline 3 is appropriate when structured fields carry the load.

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?

States a specific verb (statically analyse), resource (one or more Rego policies), and output (a draft-07 JSON Schema of every input.* field read). That output framing separates it from near-siblings like rego_check_schema (validates against a schema), rego_parse_ast (returns an AST), and rego_inspect, so an agent can route without opening any schema.

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?

Names three concrete downstream uses -- writing integration tests, configuring `opa check --schema`, documenting a policy API -- which tells the agent when this is the right starting point. It stops short of explicit exclusions or naming the sibling to prefer when you already have a schema and only want validation (rego_check_schema), so it is clear context rather than full when/when-not guidance.

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

rego_inspectInspect bundle or policyA
Read-onlyIdempotent

Inspect an OPA bundle, policy directory, or single Rego file with opa inspect. Returns manifest data, namespaces, rule annotations, and (if signed) signature metadata.

ParametersJSON Schema
NameRequiredDescriptionDefault
targetYesPath to a bundle archive (`*.tar.gz`), directory, or single Rego file.
v0CompatibleNoRead the policy as Rego v0 (`--v0-compatible`), the syntax OPA used before 1.0: rules without `if`, partial sets as `deny[msg] { ... }`. Needed for a policy that has not been migrated, which OPA 1.x otherwise refuses to load. Where the tool also takes a query, the query is read as v0 too, with the future keywords imported so `in`, `every` and `some x in` still work in it.

TDQS

A3.8/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint, and destructiveHint=false, so the safety profile is covered. The description adds value beyond that by disclosing the actual return content (manifest data, namespaces, rule annotations, signature metadata if signed), which no annotation or output schema provides. It does not mention errors on unreadable paths, but that gap is minor for an inspection tool.

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?

Two compact sentences with zero filler: the first names the action and accepted inputs, the second enumerates the outputs. Everything is front-loaded and each clause earns its place.

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

Completeness4/5

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

For a two-parameter, annotation-covered read tool with no output schema, the description supplies the missing return-value information an agent would otherwise lack. The only shortfall is the absence of when-to-use guidance relative to the many sibling inspection/parsing tools.

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?

Schema description coverage is 100%: both `target` and `v0Compatible` are thoroughly documented in the schema, including the v0 syntax details. The description adds no parameter-level meaning beyond what the schema already carries, so the baseline 3 applies.

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?

States a specific verb (inspect) plus the exact resources it accepts (bundle archive, policy directory, single Rego file) and the underlying command (`opa inspect`). It also enumerates the returned artifacts (manifest, namespaces, rule annotations, signature metadata), which distinguishes it from siblings like rego_deps, rego_describe_policy, and opa_list_policies.

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

Usage Guidelines2/5

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

The description never says when to choose this over alternatives such as rego_deps, rego_describe_policy, or rego_parse_ast. It only states what the tool does, leaving the selection decision entirely to the agent.

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

rego_lintLint RegoA

Lint Rego source with the Regal linter. Returns categorized violations (style, bugs, idiomatic, performance) with file/line locations. Requires regal on PATH or REGAL_BINARY set; returns REGAL_NOT_FOUND otherwise. When called with inline source, location-bound rules whose verdict depends on the on-disk path (directory-package-mismatch) are auto-disabled to avoid temp-file false positives, and location.file is reported as <inline> instead of the randomized temp path. Re-enable those rules via enable if your workflow actually needs them.

ParametersJSON Schema
NameRequiredDescriptionDefault
pathsNoFilesystem paths to lint. Each path must be inside an allowed root (OPA_MCP_ALLOWED_PATHS).
enableNoEnable specific named rules.
sourceNoInline Rego source. Mutually exclusive with `paths`.
disableNoDisable specific named rules.
failLevelNoSeverity at which Regal returns a non-zero exit. Default: `error`.
configFileNoPath to a Regal config file (defaults to .regal/config.yaml lookup).
ignoreFilesNoGlob patterns to skip.
enableCategoryNoEnable entire rule categories.
disableCategoryNoDisable entire rule categories (e.g. style, idiomatic, bugs).

TDQS

A4.3/5.0
Behavior5/5

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

The description goes well beyond annotations. It discloses the external dependency (`regal` on PATH or `REGAL_BINARY`), the failure mode (`REGAL_NOT_FOUND`), the auto-disabling of path-dependent rules for inline source, and the `<inline>` path substitution. This is excellent behavioral disclosure that cannot be inferred from the schema. The `readOnlyHint: false` is consistent with a lint operation that launches an external process; no contradiction.

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

Conciseness4/5

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

The description is compact and information-dense. The first sentence states the core purpose; the second covers dependencies and failure modes; the third explains conditional behavior for inline source. It is front-loaded and every sentence earns its place. A small deduction because the inline-source caveat is long and could be trimmed.

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

Completeness4/5

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

The description covers return categories, dependency requirements, inline-source behavior, and path handling. With 9 parameters and no output schema, the remaining gap is the exact shape of the returned violation objects (e.g., severity codes, rule IDs). Still, for an agent choosing and invoking the tool, the most important operational details are present. Could mention that `paths` must be within allowed roots, but that is already in the schema.

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?

Schema coverage is 100%, so every parameter already has a description in the schema. The tool description does not repeat parameter details, which is appropriate. However, it also doesn't add semantic context about how `enable`/`disable`/`enableCategory`/`disableCategory` interact or how `failLevel` maps to exit codes beyond what the schema already says. Baseline 3 is fair because the schema carries the load.

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?

States a specific verb ('Lint'), a specific resource ('Rego source'), and names the actual linter ('Regal'). It also specifies returns 'categorized violations (style, bugs, idiomatic, performance) with file/line locations', which distinguishes it from other rego_* tools that analyze, transform, or evaluate Rego.

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 clearly explains how to invoke it with `paths` or inline `source`, and notes the behavior difference for the inline case. It doesn't explicitly spell out 'use X instead when...' alternatives, but the sibling list is large and the description's focus on inline-source behavioral detail implies the relevant context. Slight gap: no explicit statement about when to prefer rego_check, rego_fix, or rego_security_audit over this linter.

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

rego_migrate_v1Migrate Rego to v1 syntaxA

Migrate Rego v0 source to Rego v1. First renames what v1 reserves (a rule called contains, every, if or in, and every reference to it in the module) and replaces built-ins v1 removed: re_match and net.cidr_overlap by their v1 names, and all, any, set_diff and the cast_* family by a helper function appended to the module that returns exactly what the built-in did, so behaviour does not change. re_match and net.cidr_overlap get such a helper too where the rename would change behaviour: the module mocks one spelling with with while calling both, or binds regex or net itself. Then opa fmt --rego-v1 converts the syntax (if, contains, import rego.v1) and opa check validates the result. rewrites lists each change by line and notes says why; a renamed rule must also be renamed in any other module that uses it. Pass inputs to evaluate the original as v0 and the result as v1 against each and compare every rule of the package, and queries to compare expressions too, such as calls to its functions; equivalence reports any difference. Evaluating runs the policy, http.send included. Returns the migrated source even when check finds remaining errors. A source that parses only as Rego v1 is returned unchanged; one that parses as both, such as v1 that imports rego.v1, is reformatted like any other. If the source parses as neither, returns INVALID_REGO with opa's own message.

ParametersJSON Schema
NameRequiredDescriptionDefault
inputsNoUp to 20 input documents to check the migration against. The original is evaluated as Rego v0 and the migrated policy as Rego v1 against each one, every rule of the package that is not a function is compared by value and by type, and `equivalence` reports any that differ.
sourceYesRego v0 source to migrate to Rego v1 syntax. Rules named with a word v1 reserves are renamed and built-ins v1 removed are replaced before `opa fmt --rego-v1` converts the syntax; any remaining issues are returned in `errors` so you can resolve them manually.
queriesNoUp to 10 Rego expressions to compare on each of `inputs` as well. A function has no value without arguments, so this is how functions are compared: `data.lib.names.label_ok(input.name, input.label)`. An expression that names a rule this tool renames, as `data.<package>.<rule>`, reaches it under its new name on the migrated side.

TDQS

A4.6/5.0
Behavior5/5

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

With annotations only indicating readOnlyHint=false and openWorldHint=true, the description carries and exceeds the burden: it discloses the rename logic, built-in replacement via appended helpers, behaviour-preservation intent, that evaluation runs the policy 'http.send included' (matching openWorldHint), that migrated source is returned even when check finds errors, and the INVALID_REGO failure mode. No contradiction with the annotations.

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

Conciseness4/5

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

Purpose is front-loaded in the first sentence and every subsequent sentence carries concrete information (rename rules, equivalence reporting, edge cases). It is dense and long, but the length is largely earned by genuine tool complexity; only minor tightening is possible.

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?

There is no output schema, so the description must cover return values, and it does: `rewrites`, `notes`, `equivalence`, `errors`, and the `INVALID_REGO` message. Combined with the mutation/network annotations, an agent has everything needed to call and interpret results.

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

Parameters4/5

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

Schema coverage is 100%, so the baseline is 3, but the description adds real meaning beyond the schema: it explains that `inputs` drives per-rule value/type comparison with `equivalence` reporting differences, and that `queries` is how functions are compared and can resolve names this tool renames. This goes beyond the schema's own descriptions.

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 opens with a specific verb+resource: 'Migrate Rego v0 source to Rego v1.' It clearly delineates this from siblings like rego_format and rego_check by explaining it performs renames/built-in replacement, then delegates syntax conversion and validation to those tools internally.

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?

It gives clear context for when the tool applies (v0 sources needing v1 migration) and handles edge cases: source that parses only as v1 is returned unchanged, source parsing as neither returns INVALID_REGO. However, it never explicitly names sibling alternatives (e.g., rego_fix, rego_format) or states when NOT to reach for this tool, so routing among the many rego_* siblings is left to inference.

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

rego_parse_astParse Rego to ASTA
Read-onlyIdempotent

Parse Rego source to a JSON AST using opa parse. Returns the AST as a tree of nodes (package, imports, rules, expressions, terms). Use this when you need to introspect policy structure programmatically.

ParametersJSON Schema
NameRequiredDescriptionDefault
sourceYesRego source code to parse.
v0CompatibleNoRead the policy as Rego v0 (`--v0-compatible`), the syntax OPA used before 1.0: rules without `if`, partial sets as `deny[msg] { ... }`. Needed for a policy that has not been migrated, which OPA 1.x otherwise refuses to load. Where the tool also takes a query, the query is read as v0 too, with the future keywords imported so `in`, `every` and `some x in` still work in it.

TDQS

A3.6/5.0
Behavior3/5

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

Annotations already establish readOnlyHint, idempotentHint, destructiveHint=false, so the safety profile is covered. The description adds that output is a node tree, but says nothing about behavior on malformed Rego (parse error vs partial AST) or dependency on the local `opa` binary. Anti-nothing contradictions.

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?

Three short sentences, front-loaded with the action and mechanism, then the return shape, then usage. No filler or redundancy.

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

Completeness4/5

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

With no output schema, the description usefully characterizes the return value as a node tree, and the complex v0Compatible semantics live in the schema. Missing only minor operational detail such as error behavior, which prevents a 5.

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?

Schema description coverage is 100%, so both `source` and `v0Compatible` are already documented at length in the schema. The description adds no parameter-level meaning beyond that, which is the baseline-3 case.

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

Purpose4/5

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

States a specific verb+resource (parse Rego source) and the concrete mechanism (`opa parse`), plus the output shape (JSON AST tree of package/imports/rules/expressions/terms). It does not explicitly name which sibling it replaces, so it stops short of a 5.

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

Usage Guidelines3/5

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

"Use this when you need to introspect policy structure programmatically" gives implied usage, but there is no when-not guidance and no contrast with plausible alternatives such as rego_inspect or rego_describe_policy, which an agent could easily confuse for this task.

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

rego_playground_shareShare Rego policy as a GitHub GistA

Share a Rego policy with teammates or create a reproducible example by publishing it as a GitHub Gist, secret unless public: true is passed, so only people holding the link can read it. Returns { gistUrl, rawPolicyUrl, id, public }: the gistUrl renders the policy with syntax highlighting on github.com; the rawPolicyUrl can be passed directly to OPA (opa eval -d <rawPolicyUrl> <query>) or used as a data source in Conftest. When query, input, or data are supplied, a metadata.json file is bundled into the Gist so recipients have the full evaluation context to reproduce results. Each call creates a new Gist -- use the returned id to reference it later. Requires GITHUB_TOKEN in the environment (GitHub personal access token with the "gist" scope); returns GITHUB_TOKEN_MISSING with setup instructions if unset.

ParametersJSON Schema
NameRequiredDescriptionDefault
dataNoData document as a JSON string. Stored in metadata.json alongside the policy file.
inputNoInput document as a JSON string. Stored in metadata.json alongside the policy file.
queryNoDefault query to evaluate against the policy, e.g. "data.authz.allow". Stored in metadata.json alongside the policy file.
policyYesRego source code to share (the contents of a .rego file).
publicNoMake the Gist public: listed on the account and searchable. Off by default, which creates a secret Gist that anyone holding the link can read but that is not listed anywhere.
descriptionNoShort description for the Gist (shown on github.com/gists).

TDQS

A4.4/5.0
Behavior5/5

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

Rich disclosure well beyond the annotations: the GITHUB_TOKEN environment requirement plus the GITHUB_TOKEN_MISSING failure mode, non-idempotency ('Each call creates a new Gist'), the secret-by-default privacy behavior, and return-field semantics (gistUrl vs rawPolicyUrl with concrete OPA/Conftest usage). All of this is consistent with readOnlyHint=false, openWorldHint=true, and idempotentHint=false — no contradiction.

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

Conciseness4/5

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

Roughly 150 words, with the purpose front-loaded and each subsequent sentence carrying distinct information: privacy default, return format, OPA/Conftest integration, metadata bundling, non-idempotency, and auth requirement. Slightly long, but the density is justified given six parameters, external side effects, and an auth dependency — no sentence is wasted.

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?

For a complex externally-visible write tool with no output schema, the description is complete: it states the return shape inline ({ gistUrl, rawPolicyUrl, id, public }), covers the auth prerequisite and its failure mode, discloses the side effect (new Gist per call), and explains the privacy default. An agent has everything it needs to invoke the tool and interpret the result.

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?

Schema description coverage is 100%, so the baseline is 3: every parameter (data, input, query, policy, public, description) already has a thorough schema description. The prose adds connective value by explaining that supplying query/input/data triggers metadata.json bundling for reproducibility, but it does not need to and does not meaningfully re-explain individual parameters.

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 opens with a specific verb and resource: "Share a Rego policy with teammates or create a reproducible example by publishing it as a GitHub Gist." It states exactly what the tool does and for what ends. It is unambiguously distinct from all 50+ siblings — no other tool publishes to an external service or deals with Gists.

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 gives explicit trigger scenarios: sharing with teammates and creating a reproducible example, including the 'full evaluation context' benefit of bundling query/input/data. It does not name alternatives or state when-not-to-use, but no sibling performs this function, so exclusions would be low-value; the context is clear enough for an agent to select it correctly.

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

rego_policy_diffDiff two Rego policiesA

Evaluate the same query against two policies (or two versions of the same policy) and compare the results. Both evaluations run in parallel. Returns equal: true/false, the raw result from each side, and changedPaths -- the dot/bracket paths that differ. Useful for verifying that a refactor preserves behavior, or understanding exactly where two policies diverge. Each side takes either inline source (sourceA/sourceB) or a file/directory path (pathA/pathB). The same input and query are used for both evaluations.

ParametersJSON Schema
NameRequiredDescriptionDefault
inputNoInline input document (JSON). Mutually exclusive with inputPath.
pathANoFile or directory path for policy A. Must be inside an allowed root. Mutually exclusive with sourceA.
pathBNoFile or directory path for policy B. Must be inside an allowed root. Mutually exclusive with sourceB.
queryYesThe query to evaluate against both policies, e.g. "data.example.allow".
sourceANoInline Rego source for policy A. Mutually exclusive with pathA.
sourceBNoInline Rego source for policy B. Mutually exclusive with pathB.
dataPathsNoAdditional data or policy paths loaded for both evaluations. Each must be inside an allowed root.
inputPathNoPath to a JSON input file. Must be inside an allowed root. Mutually exclusive with input.
v0CompatibleANoRead policy A as Rego v0 (`--v0-compatible`), the syntax before OPA 1.0. Set this and leave `v0CompatibleB` off to compare a legacy policy with its migrated copy.
v0CompatibleBNoRead policy B as Rego v0 (`--v0-compatible`).

TDQS

A4.4/5.0
Behavior4/5

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

Adds real behavioral context beyond the annotations: both evaluations run in parallel, the same input/query are shared across both sides, and the return shape (equal, raw result per side, changedPaths) is spelled out. The annotations (readOnlyHint=false, openWorldHint=true) are covered without contradiction.

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

Conciseness4/5

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

Four sentences, all earning their place, with the core purpose and the return contract front-loaded ahead of the parameter pairing details. Slightly denser than necessary but no wasted filler.

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?

For a 10-parameter tool with no output schema, the description still explains the return values (equal, per-side result, changedPaths) and the A/B source-or-path model, so an agent can call it correctly without inferring anything critical.

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

Parameters4/5

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

Schema description coverage is already 100%, so the baseline is 3, but the description adds the cross-parameter semantics the schema only states per-field: the A/B sides each accept either inline source or a path, and both sides share one input and query. That mutual-exclusivity and pairing logic is genuinely additive.

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?

States a specific verb and resource ('Evaluate the same query against two policies and compare the results'), and is clearly distinguishable from siblings like rego_eval or rego_eval_with_explain which evaluate a single policy. An agent knows exactly what this does without opening the schema.

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?

Gives concrete motivating use cases -- 'verifying that a refactor preserves behavior' and 'understanding exactly where two policies diverge' -- which tells the agent when this tool is the right choice. It stops short of naming an alternative tool or stating when NOT to use it, so it doesn't reach the top tier.

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

rego_security_auditRego security auditA

Run regal lint restricted to its bugs category, the correctness rules whose defects most often turn into policy bypasses, plus any custom rules placed in a security category, across one or more policy directories. Returns findings grouped by severity (high/medium) with remediation guidance. Use this for a periodic fleet-wide sweep rather than per-file style review. Requires regal.

ParametersJSON Schema
NameRequiredDescriptionDefault
pathsYesPolicy directories or files to audit. Each must be inside an allowed root (OPA_MCP_ALLOWED_PATHS). Pass the root of your policy fleet to scan everything at once.
configFileNoPath to a Regal config file. Useful when your repo has custom rule configuration.
ignoreFilesNoGlob patterns to exclude from the audit.

TDQS

A4.1/5.0
Behavior4/5

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

Beyond the annotations (readOnlyHint=false, openWorldHint=true), the description discloses the return shape — findings grouped by severity (high/medium) with remediation guidance — and the prerequisite that regal must be installed. It also reveals the rule-selection behavior (correctness rules tied to policy bypasses plus custom security rules). Nothing stated contradicts the annotations.

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

Conciseness4/5

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

Three sentences cover purpose, output format, usage context, and a prerequisite with no filler or repetition. The core action and scope are front-loaded in the first sentence, with the 'Requires regal' caveat appropriately tucked at the end.

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

Completeness4/5

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

With no output schema, the description compensates by describing the findings format (grouped by severity, with remediation guidance). The allowed-roots path constraint lives in the schema, and fleet-vs-per-file guidance covers usage context. Minor gaps like exit-code behavior are acceptable for a non-mutating lint tool.

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?

Schema description coverage is 100%, with paths, configFile, and ignoreFiles each documented, including the allowed-roots constraint on paths and the fleet-roots hint. The description adds no parameter-specific meaning beyond what the schema already provides, so the high-coverage baseline of 3 applies.

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 names a specific verb and resource: it runs regal lint restricted to the `bugs` category plus custom `security`-category rules across policy directories. This precise rule-subset scope differentiates it from the general sibling rego_lint without needing to open that tool's schema. The action, resource, and scope are all explicit and unambiguous.

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 gives explicit when-to-use guidance: 'Use this for a periodic fleet-wide sweep rather than per-file style review.' This clearly frames the intended context and rules out per-file review, but it stops short of naming a specific alternative tool for that excluded case, which keeps it from a 5.

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

rego_suggest_fixSuggest fix for Rego diagnosticsA
Read-onlyIdempotent

Map common Rego compile errors and Regal lint findings to mechanical fix suggestions. Pass diagnostics from rego_check or rego_lint. Returns one suggestion per input diagnostic; confidence is high for well-known patterns, medium for partial matches, low for everything else.

ParametersJSON Schema
NameRequiredDescriptionDefault
diagnosticsYesDiagnostics from rego_check or rego_lint.

TDQS

A4/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent, non-destructive. The description adds that it returns one suggestion per diagnostic and confidence levels (high/medium/low). This provides useful behavioral context beyond annotations, though it does not detail the output structure.

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?

Two sentences, front-loaded with purpose, no unnecessary words. Every sentence adds value.

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

Completeness4/5

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

Given the tool's simplicity and no output schema, the description explains input source, output quantity, and confidence levels. It does not describe the suggestion structure, but for a low-complexity tool, this is nearly complete.

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?

Schema coverage is 100% with descriptions for all fields. The description only adds that diagnostics should come from rego_check or rego_lint, which is helpful but minimal. Baseline 3 is appropriate.

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

Purpose4/5

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

The description clearly states it maps compile errors and lint findings to fix suggestions, and specifies the source diagnostics. However, it does not explicitly differentiate from sibling tool rego_fix, which may apply fixes, leaving some ambiguity.

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?

Explicitly instructs to pass diagnostics from rego_check or rego_lint, providing clear usage context. Does not mention when not to use or alternatives, but the context is sufficient for an AI agent.

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

rego_testRun Rego testsA

Run Rego unit tests with opa test. Returns aggregate pass/fail/skip/error counts plus per-test records. errored counts tests OPA could not evaluate (a rule conflict, a raising built-in); such a test is neither a pass nor a failure, and a suite with any is not passing. Tests live in *_test.rego files; rule names beginning with test_ are picked up automatically. Use runPattern to filter by name regex; when no tests match, the error hint includes the pattern you supplied. Use threshold to gate on minimum coverage (returns COVERAGE_BELOW_THRESHOLD on failure). Use varValues: true with verbose: true to include local variable bindings in the trace -- essential for debugging table-driven tests written with every tc in cases { ... } to identify which case caused a failure. When tests use the test_x[case] parameterized form, OPA reports the rule as a single test whatever the number of cases; parameterizedGroups maps the rule name to a record per case and caseCounts totals them, so a failing rule says which case failed. Use ignorePatterns to exclude generated or fixture files. Use bundle: true when testing bundle-structured policy directories. Use timeout to raise the per-test limit beyond OPA's default 5s. Note: enabling coverage or threshold switches OPA to coverage-report output mode -- per-test counts are unavailable but coverage and coveragePct fields are populated.

ParametersJSON Schema
NameRequiredDescriptionDefault
countNoNumber of times to repeat the suite (`--count N`). Default is 1. Useful for catching flaky tests. OPA stops at the first repetition that fails, so `repetitions` in the output reports how many actually ran, and each test is listed once carrying its worst outcome across them.
pathsYesTest directories or files. `opa test` looks for `*_test.rego` siblings of source files.
bundleNoLoad paths as OPA bundle roots (`--bundle`). Required when testing policies structured as bundles with a `manifest.json` at the root. Not needed for plain policy directories.
explainNoAdd a query-explanation trace to test records (`--explain`). `fails` traces only failing tests, `full` traces everything, `notes` surfaces `trace()` notes, `debug` is most verbose. Populates each record's `trace` field; pair with `verbose: true` for the human-readable trace output too.
timeoutNoPer-test timeout as a Go duration string, e.g. `"30s"` or `"2m"` (`--timeout`). OPA's default is 5s. Increase for tests that load large policy sets or call slow built-ins.
verboseNoEmit per-test pass/fail details.
coverageNoInclude per-line coverage data. Switches output to coverage-report mode: test record counts are not available, but `coverage` and `coveragePct` fields are populated.
thresholdNoMinimum coverage percentage required (0–100). Returns COVERAGE_BELOW_THRESHOLD when actual coverage falls below this value. Implicitly enables coverage-report output mode.
varValuesNoInclude local variable bindings in trace output (`--var-values`). When a table-driven test using `every tc in cases { ... }` fails, the trace shows which `tc` triggered the failure. Has no effect unless `verbose: true` is also set (OPA only emits trace entries in verbose mode).
runPatternNoRun only tests whose names match this regular expression (passed as `--run`).
v0CompatibleNoRead the policy as Rego v0 (`--v0-compatible`), the syntax OPA used before 1.0: rules without `if`, partial sets as `deny[msg] { ... }`. Needed for a policy that has not been migrated, which OPA 1.x otherwise refuses to load. Where the tool also takes a query, the query is read as v0 too, with the future keywords imported so `in`, `every` and `some x in` still work in it.
v1CompatibleNoOpt in to OPA v1.0-compatible behaviors (`--v1-compatible`).
ignorePatternsNoGlob patterns for files to exclude from the test run (`--ignore <pattern>`). Pass one pattern per array element. Useful for excluding generated or fixture files that contain no tests (e.g. `["*_generated.rego", "fixtures/**"]`).

TDQS

A4.3/5.0
Behavior4/5

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

Annotations only supply readOnlyHint=false and openWorldHint=true, so the description carries most of the burden and does so well: it explains `errored` semantics (neither pass nor fail, suite not passing), the coverage/threshold output-mode switch and COVERAGE_BELOW_THRESHOLD error, the error-hint behavior echoing runPattern, and that varValues is inert without verbose. It stops short of warning that test execution runs arbitrary policy code with side-effect-capable built-ins.

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

Conciseness4/5

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

Front-loaded with purpose and return shape, then a dense run of per-flag guidance; the length is justified by 13 parameters and no output schema. It is one unbroken block with no grouping, and a few points (verbose/varValues trace behavior) are restated verbatim from the schema, costing some efficiency.

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

Completeness4/5

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

With no output schema and minimal annotations, the description does the necessary work of describing return fields (aggregate counts, per-test records, parameterizedGroups, caseCounts, coveragePct) and failure modes. It is nearly complete for a tool of this complexity; only the absence of sibling routing and execution-safety notes leaves a small gap.

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

Parameters4/5

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

Schema coverage is 100% with unusually rich per-parameter descriptions, so the baseline is 3. The description goes slightly beyond by consolidating cross-parameter interactions (varValues requires verbose; coverage/threshold switch output mode; count's worst-outcome aggregation) and by tying runPattern to the error hint, though much of this restates what the schema already says.

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?

Opens with a specific verb+resource ("Run Rego unit tests with `opa test`") and immediately defines the scope of output (aggregate counts plus per-test records). It further distinguishes itself from generic evaluation siblings by describing test-discovery semantics (`*_test.rego`, `test_` prefix) that an agent can use to tell it apart from rego_eval or conftest_test.

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?

Gives explicit when-to-use guidance for individual options: runPattern for filtering, threshold for coverage gating, varValues+verbose for table-driven debugging, ignorePatterns for generated files, bundle for bundle-structured dirs, timeout for slow suites. It does not, however, name an alternative tool (e.g. rego_test_multiroot for multi-root runs, or conftest_test for the conftest flow) to route between siblings.

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

rego_test_multirootRun Rego tests across multiple rootsA

Run opa test once per root and aggregate results. Solves the package-conflict problem that occurs when opa test . is run on a repo with multiple independent package namespaces (OPA issue #4724). Two modes: explicit (supply root list with optional per-root include paths for shared libraries) and scan (auto-discover leaf test roots using the leaf rule -- a directory is a root only if it directly contains *_test.rego files and none of its eligible subdirectories do, preventing OPA's automatic recursion from double-running tests). Use sharedPaths in scan mode to add shared library directories to every root's invocation without including them in discovery. Coverage and threshold work per-root; overallCoveragePct is the mean across roots that have coverage data.

ParametersJSON Schema
NameRequiredDescriptionDefault
rootsNoExplicit list of test root directories. Use when roots are known upfront or when scan mode cannot determine the correct roots. Mutually exclusive with `scanDir`.
scanDirNoTop-level directory to scan for test roots. Uses the leaf rule: a directory is a root only if it directly contains `*_test.rego` files and none of its eligible subdirectories do. Mutually exclusive with `roots`.
verboseNoEmit per-test pass/fail details for each root.
coverageNoInclude per-line coverage data per root. Switches output to coverage-report mode: test record counts are not available, but `coverage`, `coveragePct`, and `overallCoveragePct` fields are populated.
maxDepthNoMaximum directory depth to scan. Default: 10. Only used with `scanDir`.
maxRootsNoMaximum number of test roots allowed. Returns INVALID_INPUT if scan finds more. Default: 50. Only used with `scanDir`.
thresholdNoMinimum coverage percentage required per root (0-100). Roots below threshold have `thresholdMet: false` in their result. Implicitly enables coverage-report output mode.
varValuesNoInclude local variable bindings in trace output (`--var-values`). Only useful with `verbose: true`.
runPatternNoRun only tests whose names match this regular expression (passed as `--run` to each root).
sharedPathsNoPaths added to every root's `opa test` invocation and excluded from auto-discovery. Use for shared library directories that all roots import from.
v0CompatibleNoRead the policy as Rego v0 (`--v0-compatible`), the syntax OPA used before 1.0: rules without `if`, partial sets as `deny[msg] { ... }`. Needed for a policy that has not been migrated, which OPA 1.x otherwise refuses to load. Where the tool also takes a query, the query is read as v0 too, with the future keywords imported so `in`, `every` and `some x in` still work in it.
ignorePatternsNoAdditional directory name patterns to skip during scan (e.g., ["vendor", "*.generated"]). Supports `*` wildcards. Only used with `scanDir`.

TDQS

A4.6/5.0
Behavior5/5

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

Beyond the annotations (readOnlyHint=false, openWorldHint=true), the description discloses substantial behavior: the leaf rule and why it prevents OPA's recursion from double-running tests, that coverage/threshold apply per-root while overallCoveragePct is a mean over roots with coverage data, and that coverage switches the output mode. These are non-obvious execution semantics an agent needs.

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

Conciseness4/5

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

The purpose and the conflict it solves are front-loaded, and each subsequent sentence adds distinct information (modes, leaf rule, sharedPaths, coverage aggregation). It is dense and slightly long, with minor overlap between the description and schema descriptions, but nothing is wasted.

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?

With no output schema, the description carries the return-value burden and does so: it names the per-root result fields (thresholdMet), overallCoveragePct, and how coverage mode changes available output. For a 12-parameter, zero-required tool with nested root objects, it is complete enough to invoke correctly.

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

Parameters4/5

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

Schema coverage is 100%, so the schema already documents each field (baseline 3). The description still adds cross-parameter meaning the schema cannot: mutual exclusivity of `roots`/`scanDir`, mode-specific relevance of `sharedPaths` and scan-only params, and the fact that `threshold` implicitly enables coverage-report mode.

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 states a specific verb+resource (run `opa test` per root and aggregate) and immediately differentiates from the plain `rego_test` sibling by naming the exact problem it solves (package-conflict on multi-namespace repos, OPA issue #4724). An agent can tell exactly what this does and why it exists.

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?

It clearly explains the two operational modes (explicit vs scan) and when to use `sharedPaths` in scan mode, giving strong context. However, it never explicitly contrasts with the sibling `rego_test` tool ('use this instead when...'), leaving that selection to inference from the name.

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

rego_verifyFormally verify a Rego policy ruleA
Read-onlyIdempotent

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, and simple regex.match patterns (prefix: ^lit.*, suffix: .lit$, exact: ^lit$, contains: .lit., wildcard: .). Complex regex patterns (character classes, quantifiers, alternation) return INCONCLUSIVE. Also reports INCONCLUSIVE for negation-as-failure (not), comprehensions, partial set and object rules (deny contains msg), functions, else chains, and any operand it cannot encode. A body that reads an absent field is undefined rather than true, so always_true holds only if the rule is also true for an empty input: a rule requiring input.x will be answered with the counterexample {}.

ParametersJSON Schema
NameRequiredDescriptionDefault
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)
ruleYesName of the rule to verify (e.g. "allow", "deny").
sourceYesRego source to verify.
v0CompatibleNoRead the policy as Rego v0 (`--v0-compatible`), the syntax OPA used before 1.0: rules without `if`, partial sets as `deny[msg] { ... }`. Needed for a policy that has not been migrated, which OPA 1.x otherwise refuses to load. Where the tool also takes a query, the query is read as v0 too, with the future keywords imported so `in`, `every` and `some x in` still work in it.

TDQS

A4.5/5.0
Behavior5/5

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

Goes well beyond the read-only/idempotent annotations by disclosing supported patterns, INCONCLUSIVE conditions (negation-as-failure, comprehensions, partial rules, functions, else chains, unencodable operands), and the subtle undefined-vs-true empty-input semantics with a concrete counterexample. This is exactly the behavioral context an agent needs to interpret results.

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?

Front-loaded with the core capability, then dense but purposeful detail; every sentence adds verification-relevant information rather than restating the name. No filler.

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?

With no output schema, the description carries the burden of return semantics and does so completely: prove-vs-counterexample behavior, INCONCLUSIVE cases, and the empty-input edge case are all covered.

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?

Schema description coverage is 100%, so kind, rule, source, and v0Compatible are already fully documented in the schema, making the baseline 3 appropriate. The description adds interpretive context (e.g. undefined fields and the {} counterexample) but no syntax or format detail beyond the schema.

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?

States a specific verb and resource ('Formally verify a property about a Rego rule using SMT solving') and immediately anchors the mechanism (Microsoft Z3). It explicitly distinguishes itself from testing and other evaluation siblings by noting it checks ALL possible inputs and returns a counterexample.

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?

Gives clear usage context via contrast ('Unlike testing, this checks ALL possible inputs'), which selects it over rego_test/rego_eval, and enumerates when it returns INCONCLUSIVE. It does not name a specific alternative sibling tool, so routing is by implication rather than explicit reference.

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

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

  1. 26 tool updatesv0.8.0
    • Changedconftest_push1 field changed
      • addedInput schema / properties / v0Compatible
        Added value: +{
        +  "description": "Read the policy as Rego v0 (`--v0-compatible`), the syntax OPA used before 1.0: rules without `if`, partial sets as `deny[msg] { ... }`. Needed for a policy that has not been migrated, which OPA 1.x otherwise refuses to load. Where the tool also takes a query, the query is read as v0 too, with the future keywords imported so `in`, `every` and `some x in` still work in it.",
        +  "type": "boolean"
        +}
    • Changedconftest_test1 field changed
      • addedInput schema / properties / v0Compatible
        Added value: +{
        +  "description": "Read the policies as Rego v0 (`--rego-version v0`), the syntax before OPA 1.0: rules without `if`, `deny[msg] { ... }`. conftest reads v1 by default and refuses such a policy.",
        +  "type": "boolean"
        +}
    • Changedconftest_verify1 field changed
      • addedInput schema / properties / v0Compatible
        Added value: +{
        +  "description": "Read the policies as Rego v0 (`--rego-version v0`), the syntax before OPA 1.0: rules without `if`, `deny[msg] { ... }`. conftest reads v1 by default and refuses such a policy.",
        +  "type": "boolean"
        +}
    • Changedopa_bundle_build1 field changed
      • changedInput schema / properties / v0Compatible / description
        Previous value: -"Read the policy as Rego v0 (`--v0-compatible`), the syntax OPA used before 1.0: rules without `if`, partial sets as `deny[msg] { ... }`. Needed for a policy that has not been migrated, which OPA 1.x otherwise refuses to load."New value: +"Read the policy as Rego v0 (`--v0-compatible`), the syntax OPA used before 1.0: rules without `if`, partial sets as `deny[msg] { ... }`. Needed for a policy that has not been migrated, which OPA 1.x otherwise refuses to load. Where the tool also takes a query, the query is read as v0 too, with the future keywords imported so `in`, `every` and `some x in` still work in it."
    • Changedopa_exec2 fields changed
      • changedInput schema / properties / dataPaths / description
        Previous value: -"Policy and data files or directories, loaded the way `opa eval --data` loads them: a `.rego` file as a module, a JSON or YAML file merged into the data root, a directory recursively, so every JSON and YAML file in it is data. A bundle among them (an archive, or a directory holding a `.manifest`) is loaded as a bundle instead; bundles and plain paths cannot be mixed. To load a directory as a bundle, reading only its data.json, pass it as `bundle`. Mutually exclusive with `bundle`."New value: +"Policy and data files or directories, loaded the way `opa eval --data` loads them: a `.rego` file as a module, a JSON or YAML file merged into the data root, a directory recursively, so every JSON and YAML file in it is data and must parse. One difference: a bundle archive (`.tar.gz`) inside a directory is not loaded, and `warnings` names it. A bundle given here directly (an archive, or a directory holding a `.manifest`) is loaded as a bundle; bundles and plain paths cannot be mixed. To load a directory as a bundle, reading only its `.rego` files and those named data.json, data.yaml or data.yml, pass it as `bundle`. Mutually exclusive with `bundle`."
      • changedInput schema / properties / v0Compatible / description
        Previous value: -"Read the policy as Rego v0 (`--v0-compatible`), the syntax OPA used before 1.0: rules without `if`, partial sets as `deny[msg] { ... }`. Needed for a policy that has not been migrated, which OPA 1.x otherwise refuses to load."New value: +"Read the policy as Rego v0 (`--v0-compatible`), the syntax OPA used before 1.0: rules without `if`, partial sets as `deny[msg] { ... }`. Needed for a policy that has not been migrated, which OPA 1.x otherwise refuses to load. Where the tool also takes a query, the query is read as v0 too, with the future keywords imported so `in`, `every` and `some x in` still work in it."
    • Changedrego_bench1 field changed
      • changedInput schema / properties / v0Compatible / description
        Previous value: -"Read the policy as Rego v0 (`--v0-compatible`), the syntax OPA used before 1.0: rules without `if`, partial sets as `deny[msg] { ... }`. Needed for a policy that has not been migrated, which OPA 1.x otherwise refuses to load."New value: +"Read the policy as Rego v0 (`--v0-compatible`), the syntax OPA used before 1.0: rules without `if`, partial sets as `deny[msg] { ... }`. Needed for a policy that has not been migrated, which OPA 1.x otherwise refuses to load. Where the tool also takes a query, the query is read as v0 too, with the future keywords imported so `in`, `every` and `some x in` still work in it."
    • Changedrego_check1 field changed
      • changedInput schema / properties / v0Compatible / description
        Previous value: -"Read the policy as Rego v0 (`--v0-compatible`), the syntax OPA used before 1.0: rules without `if`, partial sets as `deny[msg] { ... }`. Needed for a policy that has not been migrated, which OPA 1.x otherwise refuses to load."New value: +"Read the policy as Rego v0 (`--v0-compatible`), the syntax OPA used before 1.0: rules without `if`, partial sets as `deny[msg] { ... }`. Needed for a policy that has not been migrated, which OPA 1.x otherwise refuses to load. Where the tool also takes a query, the query is read as v0 too, with the future keywords imported so `in`, `every` and `some x in` still work in it."
    • Changedrego_check_schema1 field changed
      • changedInput schema / properties / v0Compatible / description
        Previous value: -"Read the policy as Rego v0 (`--v0-compatible`), the syntax OPA used before 1.0: rules without `if`, partial sets as `deny[msg] { ... }`. Needed for a policy that has not been migrated, which OPA 1.x otherwise refuses to load."New value: +"Read the policy as Rego v0 (`--v0-compatible`), the syntax OPA used before 1.0: rules without `if`, partial sets as `deny[msg] { ... }`. Needed for a policy that has not been migrated, which OPA 1.x otherwise refuses to load. Where the tool also takes a query, the query is read as v0 too, with the future keywords imported so `in`, `every` and `some x in` still work in it."
    • Changedrego_compile_query1 field changed
      • changedInput schema / properties / v0Compatible / description
        Previous value: -"Read the policy as Rego v0 (`--v0-compatible`), the syntax OPA used before 1.0: rules without `if`, partial sets as `deny[msg] { ... }`. Needed for a policy that has not been migrated, which OPA 1.x otherwise refuses to load."New value: +"Read the policy as Rego v0 (`--v0-compatible`), the syntax OPA used before 1.0: rules without `if`, partial sets as `deny[msg] { ... }`. Needed for a policy that has not been migrated, which OPA 1.x otherwise refuses to load. Where the tool also takes a query, the query is read as v0 too, with the future keywords imported so `in`, `every` and `some x in` still work in it."
    • Changedrego_coverage_gaps1 field changed
      • changedInput schema / properties / v0Compatible / description
        Previous value: -"Read the policy as Rego v0 (`--v0-compatible`), the syntax OPA used before 1.0: rules without `if`, partial sets as `deny[msg] { ... }`. Needed for a policy that has not been migrated, which OPA 1.x otherwise refuses to load."New value: +"Read the policy as Rego v0 (`--v0-compatible`), the syntax OPA used before 1.0: rules without `if`, partial sets as `deny[msg] { ... }`. Needed for a policy that has not been migrated, which OPA 1.x otherwise refuses to load. Where the tool also takes a query, the query is read as v0 too, with the future keywords imported so `in`, `every` and `some x in` still work in it."
    • Changedrego_describe_policy1 field changed
      • addedInput schema / properties / v0Compatible
        Added value: +{
        +  "description": "Read the policy as Rego v0 (`--v0-compatible`), the syntax OPA used before 1.0: rules without `if`, partial sets as `deny[msg] { ... }`. Needed for a policy that has not been migrated, which OPA 1.x otherwise refuses to load. Where the tool also takes a query, the query is read as v0 too, with the future keywords imported so `in`, `every` and `some x in` still work in it.",
        +  "type": "boolean"
        +}
    • Changedrego_eval1 field changed
      • changedInput schema / properties / v0Compatible / description
        Previous value: -"Read the policy as Rego v0 (`--v0-compatible`), the syntax OPA used before 1.0: rules without `if`, partial sets as `deny[msg] { ... }`. Needed for a policy that has not been migrated, which OPA 1.x otherwise refuses to load."New value: +"Read the policy as Rego v0 (`--v0-compatible`), the syntax OPA used before 1.0: rules without `if`, partial sets as `deny[msg] { ... }`. Needed for a policy that has not been migrated, which OPA 1.x otherwise refuses to load. Where the tool also takes a query, the query is read as v0 too, with the future keywords imported so `in`, `every` and `some x in` still work in it."
    • Changedrego_eval_with_coverage1 field changed
      • changedInput schema / properties / v0Compatible / description
        Previous value: -"Read the policy as Rego v0 (`--v0-compatible`), the syntax OPA used before 1.0: rules without `if`, partial sets as `deny[msg] { ... }`. Needed for a policy that has not been migrated, which OPA 1.x otherwise refuses to load."New value: +"Read the policy as Rego v0 (`--v0-compatible`), the syntax OPA used before 1.0: rules without `if`, partial sets as `deny[msg] { ... }`. Needed for a policy that has not been migrated, which OPA 1.x otherwise refuses to load. Where the tool also takes a query, the query is read as v0 too, with the future keywords imported so `in`, `every` and `some x in` still work in it."
    • Changedrego_eval_with_explain1 field changed
      • changedInput schema / properties / v0Compatible / description
        Previous value: -"Read the policy as Rego v0 (`--v0-compatible`), the syntax OPA used before 1.0: rules without `if`, partial sets as `deny[msg] { ... }`. Needed for a policy that has not been migrated, which OPA 1.x otherwise refuses to load."New value: +"Read the policy as Rego v0 (`--v0-compatible`), the syntax OPA used before 1.0: rules without `if`, partial sets as `deny[msg] { ... }`. Needed for a policy that has not been migrated, which OPA 1.x otherwise refuses to load. Where the tool also takes a query, the query is read as v0 too, with the future keywords imported so `in`, `every` and `some x in` still work in it."
    • Changedrego_eval_with_profile1 field changed
      • changedInput schema / properties / v0Compatible / description
        Previous value: -"Read the policy as Rego v0 (`--v0-compatible`), the syntax OPA used before 1.0: rules without `if`, partial sets as `deny[msg] { ... }`. Needed for a policy that has not been migrated, which OPA 1.x otherwise refuses to load."New value: +"Read the policy as Rego v0 (`--v0-compatible`), the syntax OPA used before 1.0: rules without `if`, partial sets as `deny[msg] { ... }`. Needed for a policy that has not been migrated, which OPA 1.x otherwise refuses to load. Where the tool also takes a query, the query is read as v0 too, with the future keywords imported so `in`, `every` and `some x in` still work in it."
    • Changedrego_explain_decision1 field changed
      • changedInput schema / properties / v0Compatible / description
        Previous value: -"Read the policy as Rego v0 (`--v0-compatible`), the syntax OPA used before 1.0: rules without `if`, partial sets as `deny[msg] { ... }`. Needed for a policy that has not been migrated, which OPA 1.x otherwise refuses to load."New value: +"Read the policy as Rego v0 (`--v0-compatible`), the syntax OPA used before 1.0: rules without `if`, partial sets as `deny[msg] { ... }`. Needed for a policy that has not been migrated, which OPA 1.x otherwise refuses to load. Where the tool also takes a query, the query is read as v0 too, with the future keywords imported so `in`, `every` and `some x in` still work in it."
    • Changedrego_explain_undefined1 field changed
      • addedInput schema / properties / v0Compatible
        Added value: +{
        +  "description": "Read the policy as Rego v0 (`--v0-compatible`), the syntax OPA used before 1.0: rules without `if`, partial sets as `deny[msg] { ... }`. Needed for a policy that has not been migrated, which OPA 1.x otherwise refuses to load. Where the tool also takes a query, the query is read as v0 too, with the future keywords imported so `in`, `every` and `some x in` still work in it.",
        +  "type": "boolean"
        +}
    • Changedrego_generate_test_skeleton1 field changed
      • addedInput schema / properties / v0Compatible
        Added value: +{
        +  "description": "Read the policy as Rego v0 (`--v0-compatible`). The stubs are still written with `import rego.v1`, which a v0 test run (`rego_test` with `v0Compatible`) accepts too.",
        +  "type": "boolean"
        +}
    • Changedrego_infer_input_schema1 field changed
      • addedInput schema / properties / v0Compatible
        Added value: +{
        +  "description": "Read the policy as Rego v0 (`--v0-compatible`), the syntax OPA used before 1.0: rules without `if`, partial sets as `deny[msg] { ... }`. Needed for a policy that has not been migrated, which OPA 1.x otherwise refuses to load. Where the tool also takes a query, the query is read as v0 too, with the future keywords imported so `in`, `every` and `some x in` still work in it.",
        +  "type": "boolean"
        +}
    • Changedrego_inspect1 field changed
      • changedInput schema / properties / v0Compatible / description
        Previous value: -"Read the policy as Rego v0 (`--v0-compatible`), the syntax OPA used before 1.0: rules without `if`, partial sets as `deny[msg] { ... }`. Needed for a policy that has not been migrated, which OPA 1.x otherwise refuses to load."New value: +"Read the policy as Rego v0 (`--v0-compatible`), the syntax OPA used before 1.0: rules without `if`, partial sets as `deny[msg] { ... }`. Needed for a policy that has not been migrated, which OPA 1.x otherwise refuses to load. Where the tool also takes a query, the query is read as v0 too, with the future keywords imported so `in`, `every` and `some x in` still work in it."
    • Changedrego_migrate_v12 fields changed
      • changedInput schema / properties / inputs / description
        Previous value: -"Up to 20 input documents to check the migration against. The original is evaluated as Rego v0 and the migrated policy as Rego v1 against each one, every rule of the package is compared by value and by type, and `equivalence` reports any that differ."New value: +"Up to 20 input documents to check the migration against. The original is evaluated as Rego v0 and the migrated policy as Rego v1 against each one, every rule of the package that is not a function is compared by value and by type, and `equivalence` reports any that differ."
      • addedInput schema / properties / queries
        Added value: +{
        +  "description": "Up to 10 Rego expressions to compare on each of `inputs` as well. A function has no value without arguments, so this is how functions are compared: `data.lib.names.label_ok(input.name, input.label)`. An expression that names a rule this tool renames, as `data.<package>.<rule>`, reaches it under its new name on the migrated side.",
        +  "items": {
        +    "minLength": 1,
        +    "type": "string"
        +  },
        +  "maxItems": 10,
        +  "minItems": 1,
        +  "type": "array"
        +}
    • Changedrego_parse_ast1 field changed
      • changedInput schema / properties / v0Compatible / description
        Previous value: -"Read the policy as Rego v0 (`--v0-compatible`), the syntax OPA used before 1.0: rules without `if`, partial sets as `deny[msg] { ... }`. Needed for a policy that has not been migrated, which OPA 1.x otherwise refuses to load."New value: +"Read the policy as Rego v0 (`--v0-compatible`), the syntax OPA used before 1.0: rules without `if`, partial sets as `deny[msg] { ... }`. Needed for a policy that has not been migrated, which OPA 1.x otherwise refuses to load. Where the tool also takes a query, the query is read as v0 too, with the future keywords imported so `in`, `every` and `some x in` still work in it."
    • Changedrego_policy_diff2 fields changed
      • addedInput schema / properties / v0CompatibleA
        Added value: +{
        +  "description": "Read policy A as Rego v0 (`--v0-compatible`), the syntax before OPA 1.0. Set this and leave `v0CompatibleB` off to compare a legacy policy with its migrated copy.",
        +  "type": "boolean"
        +}
      • addedInput schema / properties / v0CompatibleB
        Added value: +{
        +  "description": "Read policy B as Rego v0 (`--v0-compatible`).",
        +  "type": "boolean"
        +}
    • Changedrego_test1 field changed
      • changedInput schema / properties / v0Compatible / description
        Previous value: -"Read the policy as Rego v0 (`--v0-compatible`), the syntax OPA used before 1.0: rules without `if`, partial sets as `deny[msg] { ... }`. Needed for a policy that has not been migrated, which OPA 1.x otherwise refuses to load."New value: +"Read the policy as Rego v0 (`--v0-compatible`), the syntax OPA used before 1.0: rules without `if`, partial sets as `deny[msg] { ... }`. Needed for a policy that has not been migrated, which OPA 1.x otherwise refuses to load. Where the tool also takes a query, the query is read as v0 too, with the future keywords imported so `in`, `every` and `some x in` still work in it."
    • Changedrego_test_multiroot1 field changed
      • changedInput schema / properties / v0Compatible / description
        Previous value: -"Read the policy as Rego v0 (`--v0-compatible`), the syntax OPA used before 1.0: rules without `if`, partial sets as `deny[msg] { ... }`. Needed for a policy that has not been migrated, which OPA 1.x otherwise refuses to load."New value: +"Read the policy as Rego v0 (`--v0-compatible`), the syntax OPA used before 1.0: rules without `if`, partial sets as `deny[msg] { ... }`. Needed for a policy that has not been migrated, which OPA 1.x otherwise refuses to load. Where the tool also takes a query, the query is read as v0 too, with the future keywords imported so `in`, `every` and `some x in` still work in it."
    • Changedrego_verify1 field changed
      • addedInput schema / properties / v0Compatible
        Added value: +{
        +  "description": "Read the policy as Rego v0 (`--v0-compatible`), the syntax OPA used before 1.0: rules without `if`, partial sets as `deny[msg] { ... }`. Needed for a policy that has not been migrated, which OPA 1.x otherwise refuses to load. Where the tool also takes a query, the query is read as v0 too, with the future keywords imported so `in`, `every` and `some x in` still work in it.",
        +  "type": "boolean"
        +}
  2. 21 tool updatesv0.7.0
    • Changedconftest_test4 fields changed
      • changedInput schema / properties / inlineConfigParser / description
        Previous value: -"Parser to use for `inlineConfig`. One of: cue, dockerfile, dotenv, edn, hcl1, hcl2, hocon, ignore, ini, json, jsonnet, nginx, properties, spdx, textproto, toml, vcl, xml, yaml. Defaults to yaml. Ignored when `files` is used (conftest infers the parser from each file's extension, unless `parser` is set)."New value: +"Parser to use for `inlineConfig`. One of: cue, cyclonedx, dockerfile, dotenv, edn, groovy, hcl1, hcl2, hocon, ignore, ini, json, jsonc, jsonnet, nginx, properties, spdx, textproto, toml, vcl, xml, yaml. Defaults to yaml. Ignored when `files` is used (conftest infers the parser from each file's extension, unless `parser` is set)."
      • changedInput schema / properties / inlineConfigParser / enum
        Previous value: -[
        -  "cue",
        -  "dockerfile",
        -  "dotenv",
        -  "edn",
        -  "hcl1",
        -  "hcl2",
        -  "hocon",
        -  "ignore",
        -  "ini",
        -  "json",
        -  "jsonnet",
        -  "nginx",
        -  "properties",
        -  "spdx",
        -  "textproto",
        -  "toml",
        -  "vcl",
        -  "xml",
        -  "yaml"
        -]New value: +[
        +  "cue",
        +  "cyclonedx",
        +  "dockerfile",
        +  "dotenv",
        +  "edn",
        +  "groovy",
        +  "hcl1",
        +  "hcl2",
        +  "hocon",
        +  "ignore",
        +  "ini",
        +  "json",
        +  "jsonc",
        +  "jsonnet",
        +  "nginx",
        +  "properties",
        +  "spdx",
        +  "textproto",
        +  "toml",
        +  "vcl",
        +  "xml",
        +  "yaml"
        +]
      • changedInput schema / properties / parser / description
        Previous value: -"Force a specific parser for all input `files` via conftest's global `--parser` flag, overriding extension-based detection. Useful for files whose extension does not match their format (e.g. parse a `.tfstate` file as `json`). One of: cue, dockerfile, dotenv, edn, hcl1, hcl2, hocon, ignore, ini, json, jsonnet, nginx, properties, spdx, textproto, toml, vcl, xml, yaml. For `inlineConfig`, prefer `inlineConfigParser`."New value: +"Force a specific parser for all input `files` via conftest's global `--parser` flag, overriding extension-based detection. Useful for files whose extension does not match their format (e.g. parse a `.tfstate` file as `json`). One of: cue, cyclonedx, dockerfile, dotenv, edn, groovy, hcl1, hcl2, hocon, ignore, ini, json, jsonc, jsonnet, nginx, properties, spdx, textproto, toml, vcl, xml, yaml. For `inlineConfig`, prefer `inlineConfigParser`."
      • changedInput schema / properties / parser / enum
        Previous value: -[
        -  "cue",
        -  "dockerfile",
        -  "dotenv",
        -  "edn",
        -  "hcl1",
        -  "hcl2",
        -  "hocon",
        -  "ignore",
        -  "ini",
        -  "json",
        -  "jsonnet",
        -  "nginx",
        -  "properties",
        -  "spdx",
        -  "textproto",
        -  "toml",
        -  "vcl",
        -  "xml",
        -  "yaml"
        -]New value: +[
        +  "cue",
        +  "cyclonedx",
        +  "dockerfile",
        +  "dotenv",
        +  "edn",
        +  "groovy",
        +  "hcl1",
        +  "hcl2",
        +  "hocon",
        +  "ignore",
        +  "ini",
        +  "json",
        +  "jsonc",
        +  "jsonnet",
        +  "nginx",
        +  "properties",
        +  "spdx",
        +  "textproto",
        +  "toml",
        +  "vcl",
        +  "xml",
        +  "yaml"
        +]
    • Changedopa_bundle_build1 field changed
      • addedInput schema / properties / v0Compatible
        Added value: +{
        +  "description": "Read the policy as Rego v0 (`--v0-compatible`), the syntax OPA used before 1.0: rules without `if`, partial sets as `deny[msg] { ... }`. Needed for a policy that has not been migrated, which OPA 1.x otherwise refuses to load.",
        +  "type": "boolean"
        +}
    • Changedopa_exec2 fields changed
      • changedInput schema / properties / dataPaths / description
        Previous value: -"Policy and/or data file or directory paths, each loaded as an OPA bundle root (opa exec loads policy only via bundles). Mutually exclusive with `bundle`."New value: +"Policy and data files or directories, loaded the way `opa eval --data` loads them: a `.rego` file as a module, a JSON or YAML file merged into the data root, a directory recursively, so every JSON and YAML file in it is data. A bundle among them (an archive, or a directory holding a `.manifest`) is loaded as a bundle instead; bundles and plain paths cannot be mixed. To load a directory as a bundle, reading only its data.json, pass it as `bundle`. Mutually exclusive with `bundle`."
      • addedInput schema / properties / v0Compatible
        Added value: +{
        +  "description": "Read the policy as Rego v0 (`--v0-compatible`), the syntax OPA used before 1.0: rules without `if`, partial sets as `deny[msg] { ... }`. Needed for a policy that has not been migrated, which OPA 1.x otherwise refuses to load.",
        +  "type": "boolean"
        +}
    • Changedrego_bench1 field changed
      • addedInput schema / properties / v0Compatible
        Added value: +{
        +  "description": "Read the policy as Rego v0 (`--v0-compatible`), the syntax OPA used before 1.0: rules without `if`, partial sets as `deny[msg] { ... }`. Needed for a policy that has not been migrated, which OPA 1.x otherwise refuses to load.",
        +  "type": "boolean"
        +}
    • Changedrego_capabilities1 field changed
      • changedInput schema / properties / version / description
        Previous value: -"A specific OPA capabilities version (e.g. \"v1.19.0\"). When neither flag is set, lists available versions."New value: +"A specific OPA capabilities version (e.g. \"v1.21.0\"). When neither flag is set, lists available versions."
    • Changedrego_check1 field changed
      • addedInput schema / properties / v0Compatible
        Added value: +{
        +  "description": "Read the policy as Rego v0 (`--v0-compatible`), the syntax OPA used before 1.0: rules without `if`, partial sets as `deny[msg] { ... }`. Needed for a policy that has not been migrated, which OPA 1.x otherwise refuses to load.",
        +  "type": "boolean"
        +}
    • Changedrego_check_schema1 field changed
      • addedInput schema / properties / v0Compatible
        Added value: +{
        +  "description": "Read the policy as Rego v0 (`--v0-compatible`), the syntax OPA used before 1.0: rules without `if`, partial sets as `deny[msg] { ... }`. Needed for a policy that has not been migrated, which OPA 1.x otherwise refuses to load.",
        +  "type": "boolean"
        +}
    • Changedrego_compile_query2 fields changed
      • changedInput schema / properties / source / description
        Previous value: -"Inline Rego policy source. Mutually exclusive with `paths`."New value: +"Inline Rego policy source. Optional: without `source` or `paths` the query runs on its own, which is enough to try a built-in or an expression."
      • addedInput schema / properties / v0Compatible
        Added value: +{
        +  "description": "Read the policy as Rego v0 (`--v0-compatible`), the syntax OPA used before 1.0: rules without `if`, partial sets as `deny[msg] { ... }`. Needed for a policy that has not been migrated, which OPA 1.x otherwise refuses to load.",
        +  "type": "boolean"
        +}
    • Changedrego_coverage_gaps1 field changed
      • addedInput schema / properties / v0Compatible
        Added value: +{
        +  "description": "Read the policy as Rego v0 (`--v0-compatible`), the syntax OPA used before 1.0: rules without `if`, partial sets as `deny[msg] { ... }`. Needed for a policy that has not been migrated, which OPA 1.x otherwise refuses to load.",
        +  "type": "boolean"
        +}
    • Changedrego_eval3 fields changed
      • addedInput schema / properties / inputs
        Added value: +{
        +  "description": "Several input documents to evaluate the same query against, up to 50, in place of `input`/`inputPath`. The result is `batch`: one entry per input, in order, each holding that input's `result` (empty when the query was undefined for it) or an `error`. An input that fails at runtime does not stop the others. A policy that does not compile fails the call, and after an input times out the inputs not yet started come back as `NOT_EVALUATED`.",
        +  "items": {},
        +  "maxItems": 50,
        +  "minItems": 1,
        +  "type": "array"
        +}
      • changedInput schema / properties / source / description
        Previous value: -"Inline Rego policy source. Mutually exclusive with `paths`."New value: +"Inline Rego policy source. Optional: without `source` or `paths` the query runs on its own, which is enough to try a built-in or an expression."
      • addedInput schema / properties / v0Compatible
        Added value: +{
        +  "description": "Read the policy as Rego v0 (`--v0-compatible`), the syntax OPA used before 1.0: rules without `if`, partial sets as `deny[msg] { ... }`. Needed for a policy that has not been migrated, which OPA 1.x otherwise refuses to load.",
        +  "type": "boolean"
        +}
    • Changedrego_eval_with_coverage2 fields changed
      • changedInput schema / properties / source / description
        Previous value: -"Inline Rego policy source. Mutually exclusive with `paths`."New value: +"Inline Rego policy source. Optional: without `source` or `paths` the query runs on its own, which is enough to try a built-in or an expression."
      • addedInput schema / properties / v0Compatible
        Added value: +{
        +  "description": "Read the policy as Rego v0 (`--v0-compatible`), the syntax OPA used before 1.0: rules without `if`, partial sets as `deny[msg] { ... }`. Needed for a policy that has not been migrated, which OPA 1.x otherwise refuses to load.",
        +  "type": "boolean"
        +}
    • Changedrego_eval_with_explain2 fields changed
      • changedInput schema / properties / source / description
        Previous value: -"Inline Rego policy source. Mutually exclusive with `paths`."New value: +"Inline Rego policy source. Optional: without `source` or `paths` the query runs on its own, which is enough to try a built-in or an expression."
      • addedInput schema / properties / v0Compatible
        Added value: +{
        +  "description": "Read the policy as Rego v0 (`--v0-compatible`), the syntax OPA used before 1.0: rules without `if`, partial sets as `deny[msg] { ... }`. Needed for a policy that has not been migrated, which OPA 1.x otherwise refuses to load.",
        +  "type": "boolean"
        +}
    • Changedrego_eval_with_profile2 fields changed
      • changedInput schema / properties / source / description
        Previous value: -"Inline Rego policy source. Mutually exclusive with `paths`."New value: +"Inline Rego policy source. Optional: without `source` or `paths` the query runs on its own, which is enough to try a built-in or an expression."
      • addedInput schema / properties / v0Compatible
        Added value: +{
        +  "description": "Read the policy as Rego v0 (`--v0-compatible`), the syntax OPA used before 1.0: rules without `if`, partial sets as `deny[msg] { ... }`. Needed for a policy that has not been migrated, which OPA 1.x otherwise refuses to load.",
        +  "type": "boolean"
        +}
    • Changedrego_explain_decision2 fields changed
      • changedInput schema / properties / source / description
        Previous value: -"Inline Rego policy source. Mutually exclusive with `paths`."New value: +"Inline Rego policy source. Optional: without `source` or `paths` the query runs on its own, which is enough to try a built-in or an expression."
      • addedInput schema / properties / v0Compatible
        Added value: +{
        +  "description": "Read the policy as Rego v0 (`--v0-compatible`), the syntax OPA used before 1.0: rules without `if`, partial sets as `deny[msg] { ... }`. Needed for a policy that has not been migrated, which OPA 1.x otherwise refuses to load.",
        +  "type": "boolean"
        +}
    • Changedrego_fix1 field changed
      • changedInput schema / properties / force / description
        Previous value: -"Allow fixing files that have uncommitted git changes, or when the project is not a git repository. Without this flag regal refuses to touch uncommitted files."New value: +"On Regal before 0.41, allow fixing files that have uncommitted git changes; those releases refuse them otherwise. Regal 0.41 removed that check, and the flag is not sent to it."
    • Changedrego_format1 field changed
      • addedInput schema / properties / v0Compatible
        Added value: +{
        +  "description": "Format a policy written in pre-1.0 Rego as pre-1.0 Rego (`--v0-compatible`), leaving its syntax as it is. OPA 1.x otherwise refuses it. To convert it to Rego v1 instead, use `rego_migrate_v1`.",
        +  "type": "boolean"
        +}
    • Changedrego_inspect1 field changed
      • addedInput schema / properties / v0Compatible
        Added value: +{
        +  "description": "Read the policy as Rego v0 (`--v0-compatible`), the syntax OPA used before 1.0: rules without `if`, partial sets as `deny[msg] { ... }`. Needed for a policy that has not been migrated, which OPA 1.x otherwise refuses to load.",
        +  "type": "boolean"
        +}
    • Changedrego_migrate_v12 fields changed
      • addedInput schema / properties / inputs
        Added value: +{
        +  "description": "Up to 20 input documents to check the migration against. The original is evaluated as Rego v0 and the migrated policy as Rego v1 against each one, every rule of the package is compared by value and by type, and `equivalence` reports any that differ.",
        +  "items": {},
        +  "maxItems": 20,
        +  "minItems": 1,
        +  "type": "array"
        +}
      • changedInput schema / properties / source / description
        Previous value: -"Rego v0 source to migrate to Rego v1 syntax. `opa fmt --rego-v1` auto-fixes reserved keywords and adds `import rego.v1`; any remaining issues are returned in `errors` so you can resolve them manually."New value: +"Rego v0 source to migrate to Rego v1 syntax. Rules named with a word v1 reserves are renamed and built-ins v1 removed are replaced before `opa fmt --rego-v1` converts the syntax; any remaining issues are returned in `errors` so you can resolve them manually."
    • Changedrego_parse_ast1 field changed
      • addedInput schema / properties / v0Compatible
        Added value: +{
        +  "description": "Read the policy as Rego v0 (`--v0-compatible`), the syntax OPA used before 1.0: rules without `if`, partial sets as `deny[msg] { ... }`. Needed for a policy that has not been migrated, which OPA 1.x otherwise refuses to load.",
        +  "type": "boolean"
        +}
    • Changedrego_test1 field changed
      • addedInput schema / properties / v0Compatible
        Added value: +{
        +  "description": "Read the policy as Rego v0 (`--v0-compatible`), the syntax OPA used before 1.0: rules without `if`, partial sets as `deny[msg] { ... }`. Needed for a policy that has not been migrated, which OPA 1.x otherwise refuses to load.",
        +  "type": "boolean"
        +}
    • Changedrego_test_multiroot1 field changed
      • addedInput schema / properties / v0Compatible
        Added value: +{
        +  "description": "Read the policy as Rego v0 (`--v0-compatible`), the syntax OPA used before 1.0: rules without `if`, partial sets as `deny[msg] { ... }`. Needed for a policy that has not been migrated, which OPA 1.x otherwise refuses to load.",
        +  "type": "boolean"
        +}
  3. 6 tool updatesv0.6.0
    • Changedconftest_verify1 field changed
      • changedInput schema / properties / namespace / description
        Previous value: -"Namespace to verify. Defaults to `main`. Omit to verify all namespaces."New value: +"Namespace to verify. Omit to verify all namespaces."
    • Changedopa_bundle_sign2 fields changed
      • changedInput schema / properties / bundle / description
        Previous value: -"Path to a bundle directory or `.tar.gz` archive. Must be inside an allowed root."New value: +"Path to a bundle directory. Must be inside an allowed root. An archive is refused, since OPA reads the signature from inside it; build a signed archive with `opa_bundle_build` and `signingKey`."
      • removedInput schema / properties / outputDir
        Removed value: -{
        -  "description": "For an archive, the directory that receives `.signatures.json`; defaults to the archive's own directory. Must exist and be inside an allowed root. Not accepted for a directory bundle, which is signed in place.",
        -  "type": "string"
        -}
    • Changedrego_bench1 field changed
      • changedInput schema / properties / count / description
        Previous value: -"Number of times to repeat the benchmark (`--count N`). Defaults to OPA's built-in default of one. Every repetition is returned in `runs`; the top-level figures come from the fastest of them."New value: +"Number of times to repeat the benchmark (`--count N`). Defaults to OPA's built-in default of one. Above one, every repetition is returned in `runs`, `fastest` indexes the one the top-level figures come from, and `raw` is omitted since that document is in `runs`."
    • Changedrego_capabilities3 fields changed
      • addedInput schema / properties / builtins
        Added value: +{
        +  "description": "Return the full record (type signature, documentation, metadata) for up to 100 builtin names, exact matches only. `matched` counts the records returned and names not found are listed under `missing`. When the records would not fit the response cap the tool returns OUTPUT_TOO_LARGE rather than a truncated result; ask for fewer names. Do not combine with `names_only: true`, which asks for the opposite.",
        +  "items": {
        +    "minLength": 1,
        +    "type": "string"
        +  },
        +  "maxItems": 100,
        +  "minItems": 1,
        +  "type": "array"
        +}
      • removedInput schema / properties / names_only / default
        Removed value: -true
      • changedInput schema / properties / names_only / description
        Previous value: -"When true (default), return only builtin names, count, future keywords, and features. The full spec payload routinely exceeds client response size limits. Set to false to retrieve complete type signatures, documentation, and metadata for every builtin."New value: +"When true, or omitted, return only builtin names, count, future keywords, and features. The full payload for every builtin is larger than the default response cap (OPA_MCP_MAX_RESPONSE_BYTES), so `names_only: false` on its own needs that cap raised; use `builtins` to get full records for a few names instead."
    • Changedrego_check_schema1 field changed
      • changedInput schema / properties / schemaPath / description
        Previous value: -"Path to a JSON Schema file on disk to use for `input` validation. Must be inside an allowed root (OPA_MCP_ALLOWED_PATHS). Mutually exclusive with `inlineSchema`."New value: +"Path to a JSON Schema file on disk to use for `input` validation, or to a schema directory when the policy carries `# METADATA` / `schemas:` annotations naming files in it (opa reads a directory only through those). Must be inside an allowed root (OPA_MCP_ALLOWED_PATHS). Mutually exclusive with `inlineSchema`."
    • Changedrego_playground_share1 field changed
      • addedInput schema / properties / public
        Added value: +{
        +  "description": "Make the Gist public: listed on the account and searchable. Off by default, which creates a secret Gist that anyone holding the link can read but that is not listed anywhere.",
        +  "type": "boolean"
        +}
  4. 16 tool updatesv0.5.0
    • Changedconftest_pull1 field changed
      • changedInput schema / properties / policy / description
        Previous value: -"Local directory where the pulled policies will be written. Must be inside an allowed root (OPA_MCP_ALLOWED_PATHS). Defaults to `./policy` (conftest's convention)."New value: +"Local directory where the pulled policies will be written. Must be inside an allowed root (OPA_MCP_ALLOWED_PATHS). Omitted, it falls back to `policy` in the working directory of the server process, the conftest convention, which must itself sit inside an allowed root. The directory is emptied before the pull, so do not point it at one holding anything you want to keep."
    • Changedconftest_push1 field changed
      • changedInput schema / properties / policy / description
        Previous value: -"Path to the local directory containing Rego policies to push. Must be inside an allowed root (OPA_MCP_ALLOWED_PATHS) and must exist. Defaults to `./policy` (conftest's convention)."New value: +"Path to the local directory containing Rego policies to push. Must be inside an allowed root (OPA_MCP_ALLOWED_PATHS) and must exist. Omitted, it falls back to `policy` in the working directory of the server process, the conftest convention, which must itself sit inside an allowed root."
    • Changedconftest_test4 fields changed
      • changedInput schema / properties / inlineConfigParser / description
        Previous value: -"Parser to use for `inlineConfig`. Valid values: yaml (default), json, toml, hcl1, hcl2, ini, xml, dotenv, cue, jsonnet, properties, edn, hocon, dockerfile. Ignored when `files` is used (conftest infers the parser from each file's extension, unless `parser` is set)."New value: +"Parser to use for `inlineConfig`. One of: cue, dockerfile, dotenv, edn, hcl1, hcl2, hocon, ignore, ini, json, jsonnet, nginx, properties, spdx, textproto, toml, vcl, xml, yaml. Defaults to yaml. Ignored when `files` is used (conftest infers the parser from each file's extension, unless `parser` is set)."
      • addedInput schema / properties / inlineConfigParser / enum
        Added value: +[
        +  "cue",
        +  "dockerfile",
        +  "dotenv",
        +  "edn",
        +  "hcl1",
        +  "hcl2",
        +  "hocon",
        +  "ignore",
        +  "ini",
        +  "json",
        +  "jsonnet",
        +  "nginx",
        +  "properties",
        +  "spdx",
        +  "textproto",
        +  "toml",
        +  "vcl",
        +  "xml",
        +  "yaml"
        +]
      • changedInput schema / properties / parser / description
        Previous value: -"Force a specific parser for all input `files` via conftest's global `--parser` flag, overriding extension-based detection. Useful for files whose extension does not match their format (e.g. parse a `.tfstate` file as `json`). Valid values: yaml, json, toml, hcl1, hcl2, ini, xml, dotenv, cue, jsonnet, properties, edn, hocon, dockerfile. For `inlineConfig`, prefer `inlineConfigParser`."New value: +"Force a specific parser for all input `files` via conftest's global `--parser` flag, overriding extension-based detection. Useful for files whose extension does not match their format (e.g. parse a `.tfstate` file as `json`). One of: cue, dockerfile, dotenv, edn, hcl1, hcl2, hocon, ignore, ini, json, jsonnet, nginx, properties, spdx, textproto, toml, vcl, xml, yaml. For `inlineConfig`, prefer `inlineConfigParser`."
      • addedInput schema / properties / parser / enum
        Added value: +[
        +  "cue",
        +  "dockerfile",
        +  "dotenv",
        +  "edn",
        +  "hcl1",
        +  "hcl2",
        +  "hocon",
        +  "ignore",
        +  "ini",
        +  "json",
        +  "jsonnet",
        +  "nginx",
        +  "properties",
        +  "spdx",
        +  "textproto",
        +  "toml",
        +  "vcl",
        +  "xml",
        +  "yaml"
        +]
    • Changedopa_bundle_build3 fields changed
      • changedInput schema / properties / bundle / description
        Previous value: -"Load `paths` as bundle files or root directories (`--bundle`). Required when rebuilding or re-signing an existing bundle."New value: +"Load `paths` as bundle files or root directories (`--bundle`). Implied by `signingKey` and `verificationKey`; set it explicitly to rebuild an existing bundle without signing."
      • changedInput schema / properties / signingKey / description
        Previous value: -"Path to a signing key for inline signing."New value: +"Path to a PEM private key for signing the built bundle (`--signing-key`). Implies `bundle: true`, which OPA requires for signing."
      • changedInput schema / properties / verificationKey / description
        Previous value: -"Path to a PEM public key (or HMAC secret file) used to re-verify an existing signed bundle during the build (`--verification-key`). Pair with `bundle: true`."New value: +"Path to a PEM public key (or HMAC secret file) used to re-verify an existing signed bundle during the build (`--verification-key`). Implies `bundle: true`, which OPA requires for verification."
    • Changedopa_bundle_sign5 fields changed
      • changedInput schema / properties / bundle / description
        Previous value: -"Path to a bundle directory or archive. Must be in an allowed root."New value: +"Path to a bundle directory or `.tar.gz` archive. Must be inside an allowed root."
      • changedInput schema / properties / claimsFile / description
        Previous value: -"Path to extra claims to include in the signature."New value: +"Path to a JSON file of extra claims to sign, such as {\"keyid\": \"...\", \"scope\": \"...\"}. Must be inside an allowed root."
      • addedInput schema / properties / outputDir
        Added value: +{
        +  "description": "For an archive, the directory that receives `.signatures.json`; defaults to the archive's own directory. Must exist and be inside an allowed root. Not accepted for a directory bundle, which is signed in place.",
        +  "type": "string"
        +}
      • changedInput schema / properties / signingAlg / description
        Previous value: -"Signing algorithm (e.g. RS256). Default: RS256."New value: +"Signing algorithm: RS256 (default), RS384, RS512, PS256, PS384, PS512, ES256, ES384, ES512, HS256, HS384, HS512."
      • changedInput schema / properties / signingKey / description
        Previous value: -"Path to the signing key."New value: +"Path to the PEM private key (RSA or ECDSA), or for HMAC algorithms a file holding the secret. Must be inside an allowed root."
    • Changedopa_bundle_verify4 fields changed
      • changedInput schema / properties / scope / description
        Previous value: -"Expected `scope` value in the bundle signature. Required when the bundle was signed with `--scope`."New value: +"Expected `scope` claim in the signature. Pass exactly the value the bundle was signed with, and nothing if it was signed without one; the failure reason is scope_mismatch otherwise."
      • addedInput schema / properties / v0Compatible
        Added value: +{
        +  "description": "Load the bundle as Rego v0 (`--v0-compatible`). A policy written before Rego v1 otherwise fails to load, after the signature and digests have already been checked.",
        +  "type": "boolean"
        +}
      • changedInput schema / properties / verificationKey / description
        Previous value: -"Path to the PEM file containing the RSA or ECDSA public key, or the path to the HMAC secret file. Must be inside an allowed root."New value: +"Path to the PEM file containing the RSA or ECDSA public key, or for HMAC algorithms a file holding the secret. Must be inside an allowed root."
      • changedInput schema / properties / verificationKeyId / description
        Previous value: -"Key ID that must match the `keyid` field in the bundle signature. Required when the bundle was signed with `--public-key-id`."New value: +"Name the key is registered under for OPA (`--verification-key-id`, default `default`). With a single key OPA verifies against it regardless of the signature keyid claim, so this rarely needs setting."
    • Changedopa_delete_data2 fields changed
      • addedInput schema / properties / segments
        Added value: +{
        +  "description": "Path as literal key segments, e.g. [\"labels\", \"app.kubernetes.io/name\"]. Use instead of `path` when a key contains a dot or a slash.",
        +  "items": {
        +    "minLength": 1,
        +    "type": "string"
        +  },
        +  "minItems": 1,
        +  "type": "array"
        +}
      • removedInput schema / required
        Removed value: -[
        -  "path"
        -]
    • Changedopa_exec1 field changed
      • changedInput schema / properties / decision / description
        Previous value: -"The policy entrypoint to evaluate for each input, e.g. `\"data.authz.allow\"` or `\"data.policy.violations\"`. Must be a fully-qualified Rego reference."New value: +"The policy entrypoint to evaluate for each input, e.g. `\"authz/allow\"`. `opa exec` names a decision by slash-separated path with no `data.` prefix; the Rego reference forms (`data.authz.allow`, `authz.allow`) are accepted here and converted, because passing one straight through leaves every file undefined."
    • Changedopa_get_data2 fields changed
      • addedInput schema / properties / segments
        Added value: +{
        +  "description": "Path as literal key segments, e.g. [\"labels\", \"app.kubernetes.io/name\"]. Use instead of `path` when a key contains a dot or a slash.",
        +  "items": {
        +    "minLength": 1,
        +    "type": "string"
        +  },
        +  "minItems": 1,
        +  "type": "array"
        +}
      • removedInput schema / required
        Removed value: -[
        -  "path"
        -]
    • Changedopa_get_policy1 field changed
      • addedInput schema / properties / includeAst
        Added value: +{
        +  "description": "Include OPA's parsed AST alongside the source. Off by default.",
        +  "type": "boolean"
        +}
    • Changedopa_list_policies3 fields changed
      • addedInput schema / additionalProperties
        Added value: +false
      • addedInput schema / properties / includeAst
        Added value: +{
        +  "description": "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.",
        +  "type": "boolean"
        +}
      • addedInput schema / properties / includeSource
        Added value: +{
        +  "description": "Include each policy's Rego source. Off by default: fetch one policy with `opa_get_policy` rather than every policy at once.",
        +  "type": "boolean"
        +}
    • Changedopa_patch_data3 fields changed
      • changedInput schema / properties / path / description
        Previous value: -"Data path the patch is applied to. Use \"\" for the root."New value: +"Data path the patch is applied to."
      • addedInput schema / properties / segments
        Added value: +{
        +  "description": "Path as literal key segments, e.g. [\"labels\", \"app.kubernetes.io/name\"]. Use instead of `path` when a key contains a dot or a slash.",
        +  "items": {
        +    "minLength": 1,
        +    "type": "string"
        +  },
        +  "minItems": 1,
        +  "type": "array"
        +}
      • changedInput schema / required
        Previous value: -[
        -  "path",
        -  "operations"
        -]New value: +[
        +  "operations"
        +]
    • Changedopa_put_data2 fields changed
      • addedInput schema / properties / segments
        Added value: +{
        +  "description": "Path as literal key segments, e.g. [\"labels\", \"app.kubernetes.io/name\"]. Use instead of `path` when a key contains a dot or a slash.",
        +  "items": {
        +    "minLength": 1,
        +    "type": "string"
        +  },
        +  "minItems": 1,
        +  "type": "array"
        +}
      • removedInput schema / required
        Removed value: -[
        -  "path"
        -]
    • Changedopa_query_decision2 fields changed
      • addedInput schema / properties / segments
        Added value: +{
        +  "description": "Path as literal key segments, e.g. [\"labels\", \"app.kubernetes.io/name\"]. Use instead of `path` when a key contains a dot or a slash.",
        +  "items": {
        +    "minLength": 1,
        +    "type": "string"
        +  },
        +  "minItems": 1,
        +  "type": "array"
        +}
      • removedInput schema / required
        Removed value: -[
        -  "path"
        -]
    • Changedrego_bench1 field changed
      • changedInput schema / properties / count / description
        Previous value: -"Number of benchmark iterations. Defaults to OPA's built-in default."New value: +"Number of times to repeat the benchmark (`--count N`). Defaults to OPA's built-in default of one. Every repetition is returned in `runs`; the top-level figures come from the fastest of them."
    • Changedrego_test1 field changed
      • changedInput schema / properties / count / description
        Previous value: -"Number of times to repeat each test (`--count N`). Default is 1. Useful for measuring repeatability or catching flaky tests under load."New value: +"Number of times to repeat the suite (`--count N`). Default is 1. Useful for catching flaky tests. OPA stops at the first repetition that fails, so `repetitions` in the output reports how many actually ran, and each test is listed once carrying its worst outcome across them."
  5. 1 tool updatev0.3.0
    • Changedrego_capabilities1 field changed
      • changedInput schema / properties / version / description
        Previous value: -"A specific OPA capabilities version (e.g. \"v0.69.0\"). When neither flag is set, lists available versions."New value: +"A specific OPA capabilities version (e.g. \"v1.19.0\"). When neither flag is set, lists available versions."
  6. 5 tool updatesv0.1.20
    • Changedconftest_test2 fields changed
      • changedInput schema / properties / inlineConfigParser / description
        Previous value: -"Parser to use for `inlineConfig`. Valid values: yaml (default), json, toml, hcl1, hcl2, ini, xml, dotenv, cue, jsonnet, properties, dockerfile. Ignored when `files` is used (conftest infers the parser from each file's extension)."New value: +"Parser to use for `inlineConfig`. Valid values: yaml (default), json, toml, hcl1, hcl2, ini, xml, dotenv, cue, jsonnet, properties, edn, hocon, dockerfile. Ignored when `files` is used (conftest infers the parser from each file's extension, unless `parser` is set)."
      • addedInput schema / properties / parser
        Added value: +{
        +  "description": "Force a specific parser for all input `files` via conftest's global `--parser` flag, overriding extension-based detection. Useful for files whose extension does not match their format (e.g. parse a `.tfstate` file as `json`). Valid values: yaml, json, toml, hcl1, hcl2, ini, xml, dotenv, cue, jsonnet, properties, edn, hocon, dockerfile. For `inlineConfig`, prefer `inlineConfigParser`.",
        +  "type": "string"
        +}
    • Changedopa_bundle_build6 fields changed
      • addedInput schema / properties / bundle
        Added value: +{
        +  "description": "Load `paths` as bundle files or root directories (`--bundle`). Required when rebuilding or re-signing an existing bundle.",
        +  "type": "boolean"
        +}
      • addedInput schema / properties / ignore
        Added value: +{
        +  "description": "File/directory name patterns to ignore during loading (`--ignore`), e.g. `[\".*\"]` to skip hidden files. These are name patterns, not filesystem paths.",
        +  "items": {
        +    "type": "string"
        +  },
        +  "type": "array"
        +}
      • addedInput schema / properties / pruneUnused
        Added value: +{
        +  "description": "Exclude dependents of entrypoints that are not reachable from them (`--prune-unused`). Most useful alongside `entrypoints`.",
        +  "type": "boolean"
        +}
      • addedInput schema / properties / v1Compatible
        Added value: +{
        +  "description": "Opt in to OPA v1.0-compatible behaviors (`--v1-compatible`). Affects the built bundle's runtime semantics.",
        +  "type": "boolean"
        +}
      • addedInput schema / properties / verificationKey
        Added value: +{
        +  "description": "Path to a PEM public key (or HMAC secret file) used to re-verify an existing signed bundle during the build (`--verification-key`). Pair with `bundle: true`.",
        +  "type": "string"
        +}
      • addedInput schema / properties / verificationKeyId
        Added value: +{
        +  "description": "Key ID for verification (`--verification-key-id`, OPA default `default`).",
        +  "type": "string"
        +}
    • Changedopa_exec6 fields changed
      • changedInput schema / properties / dataPaths / description
        Previous value: -"Policy and/or data file or directory paths to load. Mutually exclusive with `bundle`."New value: +"Policy and/or data file or directory paths, each loaded as an OPA bundle root (opa exec loads policy only via bundles). Mutually exclusive with `bundle`."
      • addedInput schema / properties / fail
        Added value: +{
        +  "description": "CI gate: report `failed: true` when any decision is undefined or errors. Mutually exclusive with `failDefined` and `failNonEmpty`.",
        +  "type": "boolean"
        +}
      • addedInput schema / properties / failDefined
        Added value: +{
        +  "description": "CI gate: report `failed: true` when any decision is defined or errors. Use when a defined result means a violation. Mutually exclusive with `fail` and `failNonEmpty`.",
        +  "type": "boolean"
        +}
      • addedInput schema / properties / failNonEmpty
        Added value: +{
        +  "description": "CI gate: report `failed: true` when any decision result is non-empty or errors. Mutually exclusive with `fail` and `failDefined`.",
        +  "type": "boolean"
        +}
      • addedInput schema / properties / timeout
        Added value: +{
        +  "description": "Per-exec evaluation timeout as a Go duration, e.g. `\"30s\"` or `\"5m\"`. Still bounded by the server subprocess timeout (OPA_MCP_TIMEOUT_MS).",
        +  "type": "string"
        +}
      • addedInput schema / properties / v1Compatible
        Added value: +{
        +  "description": "Opt in to OPA v1.0-compatible behaviors (`--v1-compatible`).",
        +  "type": "boolean"
        +}
    • Changedrego_check2 fields changed
      • addedInput schema / properties / bundle
        Added value: +{
        +  "description": "Load `paths` as bundle files or root directories (`--bundle`). Only valid with `paths`, not inline `source`.",
        +  "type": "boolean"
        +}
      • addedInput schema / properties / maxErrors
        Added value: +{
        +  "description": "Maximum number of errors to collect before `opa check` aborts compilation (`--max-errors`, OPA default 10). Raise it to surface more diagnostics from a badly broken policy in a single pass.",
        +  "minimum": 1,
        +  "type": "integer"
        +}
    • Changedrego_test2 fields changed
      • addedInput schema / properties / explain
        Added value: +{
        +  "description": "Add a query-explanation trace to test records (`--explain`). `fails` traces only failing tests, `full` traces everything, `notes` surfaces `trace()` notes, `debug` is most verbose. Populates each record's `trace` field; pair with `verbose: true` for the human-readable trace output too.",
        +  "enum": [
        +    "fails",
        +    "full",
        +    "notes",
        +    "debug"
        +  ],
        +  "type": "string"
        +}
      • addedInput schema / properties / v1Compatible
        Added value: +{
        +  "description": "Opt in to OPA v1.0-compatible behaviors (`--v1-compatible`).",
        +  "type": "boolean"
        +}
  7. 3 tool updatesv0.1.17
    • Addedrego_playground_share
    • Changedrego_test4 fields changed
      • addedInput schema / properties / bundle
        Added value: +{
        +  "description": "Load paths as OPA bundle roots (`--bundle`). Required when testing policies structured as bundles with a `manifest.json` at the root. Not needed for plain policy directories.",
        +  "type": "boolean"
        +}
      • addedInput schema / properties / count
        Added value: +{
        +  "description": "Number of times to repeat each test (`--count N`). Default is 1. Useful for measuring repeatability or catching flaky tests under load.",
        +  "minimum": 1,
        +  "type": "integer"
        +}
      • addedInput schema / properties / ignorePatterns
        Added value: +{
        +  "description": "Glob patterns for files to exclude from the test run (`--ignore <pattern>`). Pass one pattern per array element. Useful for excluding generated or fixture files that contain no tests (e.g. `[\"*_generated.rego\", \"fixtures/**\"]`).",
        +  "items": {
        +    "type": "string"
        +  },
        +  "type": "array"
        +}
      • addedInput schema / properties / timeout
        Added value: +{
        +  "description": "Per-test timeout as a Go duration string, e.g. `\"30s\"` or `\"2m\"` (`--timeout`). OPA's default is 5s. Increase for tests that load large policy sets or call slow built-ins.",
        +  "type": "string"
        +}
    • Addedrego_test_multiroot
  8. 1 tool updatev0.1.14
    • Addedrego_explain_undefined
  9. 45 tool updatesv0.1.13
    • Addedconftest_pull
    • Addedconftest_push
    • Addedconftest_test
    • Addedconftest_verify
    • Addedmcp_server_info
    • Addedopa_bundle_build
    • Addedopa_bundle_sign
    • Addedopa_bundle_verify
    • Addedopa_compile_query
    • Addedopa_config
    • Addedopa_delete_data
    • Addedopa_delete_policy
    • Addedopa_exec
    • Addedopa_get_data
    • Addedopa_get_policy
    • Addedopa_health
    • Addedopa_list_policies
    • Addedopa_patch_data
    • Addedopa_put_data
    • Addedopa_put_policy
    • Addedopa_query_decision
    • Addedopa_status
    • Addedrego_bench
    • Addedrego_capabilities
    • Addedrego_compile_query
    • Addedrego_coverage_gaps
    • Addedrego_deps
    • Addedrego_describe_policy
    • Addedrego_eval
    • Addedrego_eval_with_coverage
    • Addedrego_eval_with_explain
    • Addedrego_eval_with_profile
    • Addedrego_explain_decision
    • Addedrego_fix
    • Addedrego_format_write
    • Addedrego_generate_test_skeleton
    • Addedrego_infer_input_schema
    • Addedrego_inspect
    • Addedrego_migrate_v1
    • Addedrego_parse_ast
    • Addedrego_policy_diff
    • Addedrego_security_audit
    • Addedrego_suggest_fix
    • Addedrego_test
    • Addedrego_verify
  10. 4 tool updates
    • Addedrego_check
    • Addedrego_check_schema
    • Addedrego_format
    • Addedrego_lint
  11. 32 tool updatesv0.1.5
    • Removedopa_bundle_build
    • Removedopa_bundle_sign
    • Removedopa_compile_query
    • Removedopa_config
    • Removedopa_delete_policy
    • Removedopa_get_data
    • Removedopa_get_policy
    • Removedopa_health
    • Removedopa_list_policies
    • Removedopa_patch_data
    • Removedopa_put_data
    • Removedopa_put_policy
    • Removedopa_query_decision
    • Removedopa_status
    • Removedrego_bench
    • Removedrego_capabilities
    • Removedrego_check
    • Removedrego_compile_query
    • Removedrego_deps
    • Removedrego_describe_policy
    • Removedrego_eval
    • Removedrego_eval_with_coverage
    • Removedrego_eval_with_explain
    • Removedrego_eval_with_profile
    • Removedrego_explain_decision
    • Removedrego_format
    • Removedrego_generate_test_skeleton
    • Removedrego_inspect
    • Removedrego_lint
    • Removedrego_parse_ast
    • Removedrego_suggest_fix
    • Removedrego_test
  12. 32 tool updatesv0.1.2
    • Addedopa_bundle_build
    • Addedopa_bundle_sign
    • Addedopa_compile_query
    • Addedopa_config
    • Addedopa_delete_policy
    • Addedopa_get_data
    • Addedopa_get_policy
    • Addedopa_health
    • Addedopa_list_policies
    • Addedopa_patch_data
    • Addedopa_put_data
    • Addedopa_put_policy
    • Addedopa_query_decision
    • Addedopa_status
    • Addedrego_bench
    • Addedrego_capabilities
    • Addedrego_check
    • Addedrego_compile_query
    • Addedrego_deps
    • Addedrego_describe_policy
    • Addedrego_eval
    • Addedrego_eval_with_coverage
    • Addedrego_eval_with_explain
    • Addedrego_eval_with_profile
    • Addedrego_explain_decision
    • Addedrego_format
    • Addedrego_generate_test_skeleton
    • Addedrego_inspect
    • Addedrego_lint
    • Addedrego_parse_ast
    • Addedrego_suggest_fix
    • Addedrego_test

TDQS

A3.7/5.0

Scored across 52 tools

Disambiguation3/5

The toolset spans many domains, but several clusters blur boundaries: rego_eval/opa_exec/opa_query_decision/rego_compile_query/opa_compile_query all evaluate or compile policies in different local/server contexts, and rego_eval_with_explain/rego_explain_decision/rego_explain_undefined overlap in tracing. opa_config and opa_status return the same configuration document under different keys, adding a redundant choice. Descriptions mitigate much of this, so the set is manageable but not cleanly disambiguated.

Naming Consistency4/5

Names consistently use snake_case with clear domain prefixes (rego_, opa_, conftest_, mcp_), which creates predictable grouping. However, several names use noun/state forms (rego_capabilities, rego_deps, opa_health, mcp_server_info) rather than a strict verb_noun pattern, and the eval/explain variants append qualifiers, so naming is mostly rather than fully consistent.

Tool Count1/5

52 tools is far beyond the 3-15 well-scoped range and triggers the rubric's 50+ extreme-mismatch category. Although OPA is broad, many tools are narrow variants (three explain/eval flavors, separate local/server compile, format vs format_write, etc.), so the surface is bloated rather than each tool earning a distinct place.

Completeness5/5

Coverage is excellent: policy CRUD and data CRUD on the server, local authoring/format/lint/check/test/coverage/benchmark, bundle build/sign/verify, Conftest integration, schema inference/validation, migration, diff, and formal verification. Almost every lifecycle stage an OPA agent would need has a tool; any missing pieces (e.g., server start/stop) are plausibly out of scope.

Maintenance

ActivityActive
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers

  • A
    license
    Not graded
    quality
    C
    maintenance
    A Model Context Protocol (MCP) server that provides safe, read-only access to Kubernetes resources for debugging and inspection. Built with security in mind, it offers comprehensive cluster visibility without modification capabilities.
    43
    MIT
  • A
    license
    B
    quality
    D
    maintenance
    A specialized MCP server that provides expert-level OpenFGA authorization modeling guidance, enabling users to create and manage authorization models for ReBAC systems directly from VS Code.
    2
    9
    MIT