Skip to main content
Glama
OrygnsCode

opa-mcp-server

Query OPA decision

opa_query_decision

Evaluate an OPA policy decision by sending input to a specified data path and receiving the rule's output.

Instructions

Evaluate a decision against the running OPA server. POSTs to the data path with {input} and returns whatever the rule produces. Use this to ask the server "given this input, what does data.X.allow say?"

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYesDecision path under `data.`, e.g. "rbac/allow" or "rbac.allow".
inputNoInput document to evaluate against.
explainNoInclude a trace at the requested level.
metricsNoInclude metrics in the response.
Behavior2/5

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

With no annotations provided, the description should disclose safety and side-effect information. It only states the action (POST to data path) but does not mention that it is read-only, required permissions, error behavior, or rate limits.

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 plus a usage example—no redundant information. The description is efficient and front-loaded with the core action.

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

Completeness2/5

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

No output schema is provided, so the description should explain the response format (e.g., includes result, optional trace/metrics). It only says 'returns whatever the rule produces,' which is insufficient for an agent to understand what to expect.

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?

Input schema covers 100% of parameters with descriptions, so baseline is 3. The description adds slight value by linking path and input to the POST action, but does not elaborate on explain or metrics beyond what the schema provides.

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 the tool evaluates an OPA decision by POSTing input to the data path, and provides a concrete example ('given this input, what does data.X.allow say?'). It distinguishes from sibling tools like rego_eval by specifying the POST method and decision path.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description gives a clear use case (querying a decision) but does not explicitly contrast with sibling tools such as rego_eval or rego_explain_decision, nor does it state when to avoid using it.

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