Skip to main content
Glama
OrygnsCode

opa-mcp-server

Query OPA decision

opa_query_decision
Read-onlyIdempotent

Query an OPA server to evaluate policy decisions by sending input to a specified data path.

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.
Behavior4/5

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

The description explains the HTTP method (POST), the data path, and that the result is whatever the rule produces. This adds context beyond the annotations (readOnlyHint, idempotentHint) which already indicate a safe operation. No contradiction with annotations.

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 concise with three short sentences. The first sentence states the core purpose, the second adds the mechanism, and the third provides a concrete use case. No unnecessary words.

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

Completeness4/5

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

The description covers the operation, input, and output vaguely ('returns whatever the rule produces'). With no output schema, more detail on the response structure would be helpful, but the annotations (readOnlyHint, idempotentHint) and the tool simplicity make it acceptable. Missing details on errors or limitations, but adequate for a simple query.

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?

The input schema has 100% coverage with descriptions for each parameter. The general description mentions `{input}` but does not add per-parameter details beyond the schema. The example path 'rbac/allow' is in the schema description, not the tool description. Hence baseline score of 3.

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 a decision against a running OPA server, with a concrete example of asking 'what does data.X.allow say?'. It uses a specific verb (evaluate) and resource (decision), distinguishing it from sibling tools like 'opa_get_data' or 'rego_eval'.

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 a clear usage scenario: 'Use this to ask the server...'. It implies the tool is for querying decisions on the running server, contrasting with tools for local evaluation or policy management. However, it does not explicitly exclude cases where other tools would be more appropriate.

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