Skip to main content
Glama
OrygnsCode

opa-mcp-server

Suggest fix for Rego diagnostics

rego_suggest_fix

Convert Rego diagnostics from rego_check or rego_lint into mechanical fix suggestions with confidence ratings for high, medium, or low pattern matches.

Instructions

Map common Rego compile errors and Regal lint findings to mechanical fix suggestions. Pass diagnostics from rego_check or rego_lint. Returns one suggestion per input diagnostic; confidence is high for well-known patterns, medium for partial matches, low for everything else.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
diagnosticsYesDiagnostics from rego_check or rego_lint.
Behavior4/5

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

With no annotations, the description bears full responsibility for behavioral disclosure. It explains the mapping to suggestions and confidence levels (high/medium/low), implying a non-destructive, analytical operation. It could be more explicit about side effects, but the provided details are adequate.

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 only two sentences, front-loaded with the primary action ('Map'), and no extraneous information. Every sentence serves a purpose.

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?

Despite no output schema, the description thoroughly explains the return format (one suggestion per diagnostic with confidence levels). It also links to sibling tools as input sources, making the tool's role 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?

Schema coverage is 100%, so baseline is 3. The description adds value by specifying the source of diagnostics (rego_check, rego_lint) beyond the schema, giving the parameter meaningful context.

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 that the tool maps compile errors and lint findings to fix suggestions, using specific verbs ('Map') and resources ('common Rego compile errors and Regal lint findings'). It distinguishes itself from sibling diagnostic tools like rego_check and rego_lint by focusing on suggesting fixes.

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 says to pass diagnostics from rego_check or rego_lint, providing clear context on when to use the tool. It does not mention when not to use it or alternatives, but the guidance is sufficient for an AI agent.

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