Skip to main content
Glama
OrygnsCode

opa-mcp-server

Benchmark Rego query

rego_bench
Read-onlyIdempotent

Benchmark Rego queries against policies and input to detect slow rules. Returns statistical timing data including iterations and nanoseconds per operation.

Instructions

Benchmark a Rego query against a policy + input with opa bench. Returns statistical timing data: iterations, ns/op, and allocation counts. Use this to spot slow rules.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYesRego query to benchmark.
pathsNoPolicy / data paths to load. Each must be in an allowed root.
inputNoInline input document.
inputPathNoPath to a JSON input file.
countNoNumber of benchmark iterations. Defaults to OPA's built-in default.
Behavior3/5

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

Annotations already declare readOnlyHint=true, destructiveHint=false, and idempotentHint=true, so the safety and idempotency are covered. The description adds that it runs 'opa bench' and returns statistical data, but does not elaborate on other behavioral aspects like installation requirements or allowed roots (though schema hints at the latter). It does not contradict 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 two sentences: the first explains the action and output, the second provides usage context. It is concise, front-loaded, and every sentence adds value.

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?

Given the lack of an output schema, the description explains the return values. Parameters are fully documented in the schema. The description is sufficient for an agent to understand purpose and usage, though it could mention that OPA must be installed.

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%, meaning all parameters are described in the input schema. The description adds no extra meaning beyond what the schema provides about the parameters.

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 action 'Benchmark a Rego query' and specifies the resource 'policy + input' using 'opa bench'. It also lists the output timing data. This is specific and distinguishes it from sibling tools like rego_eval or rego_test.

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 includes the explicit guidance 'Use this to spot slow rules,' which indicates when to use the tool. It does not state when not to use it or mention alternative tools, but the context is clear and helpful for an 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