Skip to main content
Glama

Lint Rego

rego_lint
Read-onlyIdempotent

Lint Rego policy source using the Regal linter. Returns categorized violations (style, bugs, idiomatic, performance) with file and line locations for quick fixes.

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?

Beyond annotations (readOnly, idempotent), the description details error handling (returns REGAL_NOT_FOUND), inline source behavior (auto-disable directory-package-mismatch, mangled file location), and re-enabling via 'enable'. This adds significant behavioral value.

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?

Four sentences, front-loaded with purpose, no waste. Efficiently conveys critical information without redundancy.

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?

Covers return format, error condition, tricky inline behavior, and re-enabling rules. Given 9 parameters (all schema-described) and no output schema, the description is sufficiently complete for an LLM to use 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 baseline 3. The description adds value by explaining global behaviors (e.g., inline source handling) that relate to parameters, but does not detail each parameter individually. Moderate added value.

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 'Lint Rego source with the Regal linter' and specifies the output format. It distinguishes itself from siblings (e.g., rego_check, rego_format) as the only lint tool.

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 prerequisites ('Requires regal on PATH or REGAL_BINARY set') and explains when to use inline vs paths, including auto-disabling of location-bound rules. It lacks explicit 'when not to use' but covers key usage context.

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