Skip to main content
Glama

OPA capabilities

rego_capabilities
Read-onlyIdempotent

Inspect OPA capabilities for the current or specified version: list available builtin names, features, and WASM ABI versions, or retrieve full type signatures and docs for selected builtins.

Instructions

Return OPA capabilities -- the available builtins, future keywords, features, and WASM ABI versions. With current: true, returns the running OPA's capabilities. With version: "v1.19.0", returns those of a specific version. With neither, lists available named versions. By default (names_only: true), returns only builtin names and count to stay within response size limits. Pass builtins: [...] for the full type signatures and documentation of a few named builtins; names_only: false returns every full record, which needs OPA_MCP_MAX_RESPONSE_BYTES raised above its default.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
currentNoPrint the capabilities of the currently installed OPA. Mutually exclusive with `version`.
versionNoA specific OPA capabilities version (e.g. "v1.19.0"). When neither flag is set, lists available versions.
builtinsNoReturn the full record (type signature, documentation, metadata) for up to 100 builtin names, exact matches only. `matched` counts the records returned and names not found are listed under `missing`. When the records would not fit the response cap the tool returns OUTPUT_TOO_LARGE rather than a truncated result; ask for fewer names. Do not combine with `names_only: true`, which asks for the opposite.
names_onlyNoWhen true, or omitted, return only builtin names, count, future keywords, and features. The full payload for every builtin is larger than the default response cap (OPA_MCP_MAX_RESPONSE_BYTES), so `names_only: false` on its own needs that cap raised; use `builtins` to get full records for a few names instead.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changedv0.6.0
    • addedInput schema / properties / builtins
      Added value: +{
      +  "description": "Return the full record (type signature, documentation, metadata) for up to 100 builtin names, exact matches only. `matched` counts the records returned and names not found are listed under `missing`. When the records would not fit the response cap the tool returns OUTPUT_TOO_LARGE rather than a truncated result; ask for fewer names. Do not combine with `names_only: true`, which asks for the opposite.",
      +  "items": {
      +    "minLength": 1,
      +    "type": "string"
      +  },
      +  "maxItems": 100,
      +  "minItems": 1,
      +  "type": "array"
      +}
    • removedInput schema / properties / names_only / default
      Removed value: -true
    • changedInput schema / properties / names_only / description
      Previous value: -"When true (default), return only builtin names, count, future keywords, and features. The full spec payload routinely exceeds client response size limits. Set to false to retrieve complete type signatures, documentation, and metadata for every builtin."New value: +"When true, or omitted, return only builtin names, count, future keywords, and features. The full payload for every builtin is larger than the default response cap (OPA_MCP_MAX_RESPONSE_BYTES), so `names_only: false` on its own needs that cap raised; use `builtins` to get full records for a few names instead."
  2. Changed1 schema field changedv0.3.0
    • changedInput schema / properties / version / description
      Previous value: -"A specific OPA capabilities version (e.g. \"v0.69.0\"). When neither flag is set, lists available versions."New value: +"A specific OPA capabilities version (e.g. \"v1.19.0\"). When neither flag is set, lists available versions."
  3. Addedv0.1.13
  4. Removedv0.1.5
  5. Addedv0.1.2
  6. Removedv0.1.1
  7. First observedv0.1.0

TDQS

A5/5.0
Behavior5/5

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

The annotations already mark the tool read-only, idempotent, and non-destructive. The description adds valuable behavioral context beyond that: default output shape, exact-match behavior for `builtins`, the `matched`/`missing` fields, response size constraints, and the `OUTPUT_TOO_LARGE` failure mode instead of truncation.

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 longer than average but every clause earns its place by explaining a distinct behavior or constraint. It front-loads the core purpose, then proceeds through the parameter modes in a logical order, ending with the size-cap caveat. No filler or repetition.

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

Completeness5/5

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

Given the complexity of the tool's parameter interactions and the absence of an output schema, the description is remarkably complete. It covers all parameter modes, default behavior, output contents, error behavior, and the prerequisite for `names_only: false`, leaving an agent with enough information to call the tool correctly in any scenario.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Although the schema already covers 100% of parameters, the description adds meaning beyond the schema: it explains the relationship between `names_only`, `builtins`, and the response cap, clarifies the default when `names_only` is omitted, and states that `builtins` requests exact matches with missing names reported separately. This materially helps an agent choose parameter values.

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 opens with a specific verb and resource: 'Return OPA capabilities -- the available builtins, future keywords, features, and WASM ABI versions.' This clearly distinguishes the tool from the many rego_* and opa_* siblings by describing exactly what capability metadata it exposes.

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

Usage Guidelines5/5

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

The description gives explicit conditional usage for each parameter mode: `current: true`, `version: "v1.19.0"`, and neither, plus guidance on `names_only` and `builtins`. It also warns about response size limits and the `OUTPUT_TOO_LARGE` error, so an agent knows when to request only a few builtins versus raising the cap.

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