Skip to main content
Glama

Evaluate Rego with profiling

rego_eval_with_profile

Evaluate a Rego query with profiling to return per-rule timing and evaluation counts, helping identify hot rules in slow policies.

Instructions

Evaluate with --profile and return per-rule timing and evaluation counts. Use this to find hot rules in slow policies.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
inputNoInline input document.
pathsNoPolicy / data file or directory paths. Each must be inside an allowed root.
queryYesRego query to evaluate, e.g. "data.example.allow".
sourceNoInline Rego policy source. Mutually exclusive with `paths`.
partialNoRun partial evaluation rather than full evaluation.
unknownsNoRefs to treat as unknown during partial evaluation.
inputPathNoPath to a JSON input file. Mutually exclusive with `input`.
strictBuiltinErrorsNoTreat builtin errors as fatal instead of returning undefined.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.1.13
  2. Removedv0.1.5
  3. Addedv0.1.2
  4. Removedv0.1.1
  5. First observedv0.1.0

TDQS

A4/5.0
Behavior3/5

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

The description discloses the key behavioral output (per-rule timing and evaluation counts), which goes beyond the annotations. However, readOnlyHint is false and the description does not clarify whether evaluation has any side effects or performance costs; the annotation burden is only partially addressed.

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 with no filler. The core behavior and output are front-loaded, and the purpose statement efficiently directs the agent to the use case.

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?

For a tool with 8 parameters and no output schema, the description adequately conveys the return value and typical use. It does not explain edge cases or interactions with options like partial evaluation, but those are documented in the schema and the core purpose is clear.

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%, so the schema already documents all parameters. The description adds nothing about parameter usage or constraints, but this is acceptable because the input schema carries the full parameter documentation burden.

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 states a specific verb ('Evaluate'), the exact resource ('Rego with --profile'), and what it returns ('per-rule timing and evaluation counts'). It also distinguishes itself from the many sibling eval tools by naming its purpose: finding hot rules in slow policies.

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 gives a clear use case: 'Use this to find hot rules in slow policies.' It implies when this tool is appropriate over other eval variants, though it does not explicitly name alternatives or say when not to use it.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.