Skip to main content
Glama
OrygnsCode

opa-mcp-server

Check Rego

rego_check
Read-onlyIdempotent

Type-check Rego policies with opa check. Returns validation status and structured diagnostics for inline source or file paths, with optional strict mode and schema validation.

Instructions

Type-check Rego with opa check. Returns { valid: true, errors: [] } on success, or a list of structured diagnostics with file/line locations on failure. Provide either source for inline checking or paths for file/directory checking.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sourceNoInline Rego source. Mutually exclusive with `paths`.
pathsNoFilesystem paths to check. Each path must be inside an allowed root (OPA_MCP_ALLOWED_PATHS).
strictNoEnable strict mode -- fail on unused vars, deprecated builtins, etc.
capabilitiesNoPath to a capabilities JSON file restricting allowed builtins.
schemaDirNoSchema directory for input/data validation.
Behavior4/5

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

Annotations already declare non-destructive, read-only, and idempotent behavior. The description adds value by detailing the return format (structured JSON with valid and errors) and mentioning the underlying command (`opa check`), which goes 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 long, front-loaded with the core purpose and command, and contains no redundant or irrelevant 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?

Given the tool has 5 parameters, no output schema, and rich annotations, the description adequately covers the return format, parameter usage, and key constraints. It is complete enough 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 description coverage is 100%, so baseline is 3. The description adds explanatory context about the mutual exclusivity of `source` and `paths` and the path restrictions, providing meaning beyond the schema's individual 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's purpose: 'Type-check Rego with `opa check`'. It specifies the verb (type-check) and the resource (Rego), and differentiates from sibling tools by mentioning the specific command and operation.

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 guidance on when to use each parameter: 'Provide either `source` for inline checking or `paths` for file/directory checking'. It does not explicitly list alternatives or when not to use this tool, but the context is adequate for most scenarios.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

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

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

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