Skip to main content
Glama
OrygnsCode

opa-mcp-server

Lint Rego

rego_lint

Lint Rego policy source with Regal, receiving categorized violations (bugs, style, performance) including file and line locations. Supports inline source or filesystem paths with configurable rules and severity thresholds.

Instructions

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.

Input Schema

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

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

With no annotations, the description carries the full burden and excels: details return categories, locations, binary dependency, inline-specific behavior (auto-disable, '<inline>' path), and the ability to re-enable rules via 'enable'. Also notes failLevel's effect on exit code.

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 adds unique value: purpose, output, prerequisites, inline pitfalls, and customization. No redundancy. Information is front-loaded with the core action and output.

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 9 parameters, no output schema, and no annotations, the description covers prerequisites, error cases, inline-specific behavior, and customization. Lacks explicit return structure details, but the mention of 'categorized violations with file/line locations' provides sufficient context for an agent.

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?

Input schema has 100% description coverage. The description adds behavioral context beyond the schema, e.g., mutual exclusivity of source/paths, inline auto-disable logic, and how enable/disable interact with categories. This extra value justifies a score above baseline 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?

Clearly states 'Lint Rego source with the Regal linter' and specifies the output: categorized violations with file/line locations. The verb 'lint' and tool name distinguish it from sibling analysis tools like rego_check 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 prerequisites ('Requires regal on PATH or REGAL_BINARY set') and error case (REGAL_NOT_FOUND). Explains special handling for inline source (auto-disables location-bound rules). Does not explicitly contrast with siblings or state when not to use.

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