Skip to main content
Glama
OrygnsCode

opa-mcp-server

Lint Rego

rego_lint

Lint Rego source files using Regal to detect and categorize violations in style, bugs, idiomatic, and performance rules, with file and line locations.

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 rather than paths, expect location-bound rules such as directory-package-mismatch to fire as artifacts of the randomized temp-file path. Prefer paths for canonical signal; for inline workflows, ignore or disable those rules.

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.
Behavior4/5

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

Without annotations, the description carries full burden. It discloses the prerequisite (regal on PATH), the error REGAL_NOT_FOUND, and the artifact issue with inline source. However, it does not explicitly state whether the tool is read-only or if it modifies files. Still, it provides significant behavioral context 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?

The description is concise with three sentences. The first sentence states the main purpose, the second adds prerequisites and error conditions, and the third provides usage guidance. Every sentence earns its place with no fluff.

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

Completeness5/5

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

Given no output schema, the description explains the return format (categorized violations with locations). It covers prerequisites, error cases, and special considerations for inline workflows. The parameter count of 9 is well-accounted by schema descriptions, and the description adds usage context for completeness.

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?

With 100% schema coverage, baseline is 3. The description adds value by explaining the mutual exclusivity of source and paths, the artifact issue with source, and default config file lookup. This surpasses the basic 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?

The description clearly states it lints Rego source with the Regal linter and returns categorized violations with file/line locations. The verb 'Lint' and the resource 'Rego source' are specific, and it distinguishes from sibling tools like rego_check by mentioning the specific linter.

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 provides when-to-use guidance: it recommends using `paths` for canonical signal and warns about artifacts with inline `source`. It also explains how to handle those artifacts and gives alternatives like ignoring or disabling rules. No explicit when-not-to-use but implied through these recommendations.

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