Skip to main content
Glama
OrygnsCode

opa-mcp-server

Format Rego

rego_format

Formats Rego source code to canonical style using opa fmt, returning formatted output and indicating if changes were made.

Instructions

Format Rego source code using opa fmt. Returns the formatted source and a changed flag indicating whether the input was already canonical.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sourceYesRego source code to format.
Behavior4/5

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

Without annotations, the description carries the burden. It discloses the use of `opa fmt` and the return of formatted source plus a `changed` flag. This is good behavioral transparency for a simple formatting tool.

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?

Two sentences: first states purpose, second adds return details. No wasted words, front-loaded and efficient.

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 low complexity (single parameter, no output schema, no annotations), the description fully covers purpose, behavior, return values, and underlying tool. Nothing missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100% with a clear description for the `source` parameter. The tool description does not add additional meaning beyond the schema, hitting the baseline for high coverage.

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 the action (format) and resource (Rego source code), mentioning the underlying tool `opa fmt`. Distinguishes from sibling tools like rego_check and rego_lint by focusing on formatting.

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?

Implicitly clear when to use: when formatting Rego source code. No explicit exclusions or alternatives, but the context is straightforward given the tool's name and description.

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