Skip to main content
Glama
OrygnsCode

opa-mcp-server

Check Rego

rego_check

Type-check Rego policies using OPA's check command. Returns validation status and structured error diagnostics with file and line locations.

Instructions

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

Input Schema

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?

With no annotations provided, the description fully carries the burden of disclosing behavior. It describes the return format on success and failure, and implies that the tool runs `opa check` without side effects. It does not contradict any annotations, as none exist. The description adds behavioral context beyond the schema, earning a 4.

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 consists of two concise sentences. The first states the core purpose and return format, and the second provides usage guidance. No unnecessary words or repetition. It is appropriately sized and front-loaded.

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 has 5 parameters and no output schema, the description covers the return format, the two input modes, and the constraints on paths. It is complete for a type-checking tool with these parameters, though it could mention that the output is in JSON format. Still, it is adequately complete.

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 has 100% description coverage for all parameters. The description adds value by explaining the mutual exclusivity of `source` and `paths` and the allowed-roots constraint for paths, which is not in the schema. It provides meaningful additional semantics, justifying 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 clearly states the tool's purpose (type-check Rego using `opa check`) and distinguishes it from siblings by specifying the output format and the two modes of operation (inline source vs file/directory paths). This matches the criteria for a specific verb+resource and sibling 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?

The description explicitly tells users to provide either `source` or `paths`, which is direct usage guidance. It does not, however, explicitly state when not to use this tool or mention alternatives among siblings, but the context implies it for type-checking. This is clear context without exclusions, scoring a 4.

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