Skip to main content
Glama
OrygnsCode

opa-mcp-server

Describe Rego policy

rego_describe_policy

Analyze a Rego policy to extract its package, imports, rules, and annotations, providing a structured summary for understanding policy functionality.

Instructions

Parse a Rego policy and return a structured summary: package, imports, rules (with default/args/body-length flags), and inline annotations. Useful as the first step in any "what does this policy do" workflow.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sourceYesRego source to describe.
Behavior3/5

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

No annotations are provided, so the description must cover behavioral aspects. It indicates parsing and returning a summary, implying no side effects, but does not explicitly state that it does not execute the policy or modify state. More detail on safety (read-only) would improve transparency.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two sentences efficiently convey purpose and use case. Front-loaded with the action and output. Could be slightly more concise but wastes no words.

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

Completeness3/5

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

Given the simple parameter set and lack of output schema, the description covers the main purpose and use case. However, it does not specify the return format (e.g., JSON) or mention error handling for invalid Rego. A bit more detail would make it complete.

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 description coverage is 100% for the single parameter 'source', with the schema already describing it as 'Rego source'. The description adds minimal extra meaning; baseline of 3 is appropriate per guidelines.

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 specifies the verb 'Parse' and resource 'Rego policy', and enumerates returned elements (package, imports, rules with flags, annotations). It distinguishes itself as a first-step summary tool from sibling tools like rego_parse_ast or rego_eval that perform deeper or different operations.

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?

Explicitly states it is useful as the first step in a workflow to understand a policy. While it does not list alternatives or exclusion criteria, the context from sibling names (e.g., rego_eval, rego_check) provides implicit differentiation. A clear use case is given.

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