Skip to main content
Glama

Build OPA bundle

opa_bundle_build
DestructiveIdempotent

Build a deployable OPA bundle from policy and data paths, outputting a .tar.gz archive with optional signing and optimization.

Instructions

Build a deployable bundle from policy / data paths using opa build. Output is a .tar.gz archive with optional inline signing. Supports optimization, custom revision strings, and the WASM target.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathsYesPolicy / data paths to include. Each must be in an allowed root.
outputYesOutput bundle path (typically `*.tar.gz`). Must be in an allowed root.
optimizeNoOptimization level (0 = none, 2 = aggressive).
revisionNoBundle revision string written to the manifest.
targetNoBuild target (default `rego`; `wasm` compiles to WebAssembly).
entrypointsNoEntrypoint refs (required when `target=wasm` or `optimize > 0`).
signingKeyNoPath to a signing key for inline signing.
signingAlgNoSigning algorithm (e.g. RS256).
claimsFileNoPath to a claims file for inline signing.
capabilitiesNoPath to a capabilities JSON file.
bundleNoLoad `paths` as bundle files or root directories (`--bundle`). Required when rebuilding or re-signing an existing bundle.
pruneUnusedNoExclude dependents of entrypoints that are not reachable from them (`--prune-unused`). Most useful alongside `entrypoints`.
ignoreNoFile/directory name patterns to ignore during loading (`--ignore`), e.g. `[".*"]` to skip hidden files. These are name patterns, not filesystem paths.
v1CompatibleNoOpt in to OPA v1.0-compatible behaviors (`--v1-compatible`). Affects the built bundle's runtime semantics.
verificationKeyNoPath to a PEM public key (or HMAC secret file) used to re-verify an existing signed bundle during the build (`--verification-key`). Pair with `bundle: true`.
verificationKeyIdNoKey ID for verification (`--verification-key-id`, OPA default `default`).
Behavior4/5

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

Annotations indicate destructive and idempotent. The description adds context: output is a .tar.gz archive, supports inline signing, optimization, and WASM target. It does not explicitly mention overwriting or permissions, but overall is transparent enough given the 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?

Two succinct sentences. First defines the primary action, second lists key capabilities. No wasted words.

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

Completeness3/5

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

Given 16 parameters and no output schema, the description provides a high-level overview but lacks details on return values, specific parameter interactions, or common usage patterns. Adequate but could be more complete.

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 baseline is 3. The description repeats some parameter themes (signing, optimization, revision, target) but does not add significant new meaning beyond the schema's detailed descriptions.

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 ('Build a deployable bundle'), specifies the underlying command ('opa build'), output format ('.tar.gz'), and key features (signing, optimization, WASM). This distinguishes it from sibling tools like opa_bundle_sign and opa_bundle_verify.

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

Usage Guidelines3/5

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

The description implies when to use (building a deployable bundle) but does not explicitly contrast with alternatives or provide prerequisites. It mentions features but no when-not guidance, such as when to use signing/verification tools instead.

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