Skip to main content
Glama

OPA capabilities

rego_capabilities
Read-onlyIdempotent

Return OPA capabilities—builtins, future keywords, features, and WASM ABI versions—for the running OPA, a specific version, or available versions; optionally fetch full details for named 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.23.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.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "rego_capabilities"
  }
}

Input Schema

NameRequiredDescriptionDefault
currentNoPrint the capabilities of the currently installed OPA. Mutually exclusive with `version`.
versionNoA specific OPA capabilities version (e.g. "v1.23.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. Changed1 schema field changedv0.12.0
    • changedInput schema / properties / version / description
      Previous value: -"A specific OPA capabilities version (e.g. \"v1.22.4\"). When neither flag is set, lists available versions."New value: +"A specific OPA capabilities version (e.g. \"v1.23.0\"). When neither flag is set, lists available versions."
  2. Changed1 schema field changedv0.9.2
    • changedInput schema / properties / version / description
      Previous value: -"A specific OPA capabilities version (e.g. \"v1.21.0\"). When neither flag is set, lists available versions."New value: +"A specific OPA capabilities version (e.g. \"v1.22.4\"). When neither flag is set, lists available versions."
  3. Changed1 schema field changedv0.7.0
    • changedInput schema / properties / version / description
      Previous value: -"A specific OPA capabilities version (e.g. \"v1.19.0\"). When neither flag is set, lists available versions."New value: +"A specific OPA capabilities version (e.g. \"v1.21.0\"). When neither flag is set, lists available versions."
  4. 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."
  5. 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."
  6. Addedv0.1.13
  7. Removedv0.1.5
  8. Addedv0.1.2
  9. Removedv0.1.1
  10. First observedv0.1.0

TDQS

A4.7/5.0
Behavior4/5

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

Annotations already declare readOnly/idempotent/non-destructive, but the description adds real operational context: default response-size capping, the OPA_MCP_MAX_RESPONSE_BYTES knob, and that oversized requests yield OUTPUT_TOO_LARGE rather than truncation. The mutual exclusivity of `current` and `version` is stated in prose as well as schema.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded with the return value, then organized mode-by-mode; every sentence carries content. Minor redundancy: the response-cap warning appears twice (once under `names_only: false`, once under `builtins`), which could be consolidated.

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?

With no output schema, the description still tells the agent what comes back (names, count, keywords, features, full records, `missing` list) and what error to expect. For a four-parameter read-only introspection tool, nothing material is left unspecified.

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?

Goes well beyond the 100%-covered schema by explaining defaults (`names_only` true when omitted), the `matched`/`missing` accounting for `builtins`, and the failure mode when records exceed the cap. This is semantic guidance the schema alone does not convey.

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?

States a specific verb and resource ("Return OPA capabilities") and immediately enumerates the payload: builtins, future keywords, features, WASM ABI versions. No sibling tool in the list performs capabilities introspection, so an agent can identify this tool's role from the first clause alone.

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?

Explicitly maps each parameter mode to an intent: `current: true` for the running OPA, `version` for a specific release, neither to list available versions. It also names the in-tool alternative for getting full records ("use `builtins` to get full records for a few names instead"), covering the when-not case.

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