Skip to main content
Glama

Sign OPA bundle

opa_bundle_sign
DestructiveIdempotent

Sign an OPA bundle directory or .tar.gz archive with a PEM private key, generating a .signatures.json file that enables trusted verification of the bundle.

Instructions

Sign a bundle directory or .tar.gz archive with opa sign. A directory is signed in place: .signatures.json is written into it and files are recorded as <directory name>/<file>, so the signed directory verifies wherever it is placed as long as its name is unchanged, with opa_bundle_verify or with opa build or opa run --bundle <name> from its parent. For an archive the signature is written beside it, into outputDir or the archive's own directory, and the archive is not modified; a signed archive comes from opa_bundle_build with signingKey. The key is a PEM private key (RSA or ECDSA); for HMAC algorithms pass a file holding the secret. Extra claims such as keyid and scope come from claimsFile. Returns the path written, the algorithm, and the number of files covered.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
bundleYesPath to a bundle directory or `.tar.gz` archive. Must be inside an allowed root.
outputDirNoFor an archive, the directory that receives `.signatures.json`; defaults to the archive's own directory. Must exist and be inside an allowed root. Not accepted for a directory bundle, which is signed in place.
claimsFileNoPath to a JSON file of extra claims to sign, such as {"keyid": "...", "scope": "..."}. Must be inside an allowed root.
signingAlgNoSigning algorithm: RS256 (default), RS384, RS512, PS256, PS384, PS512, ES256, ES384, ES512, HS256, HS384, HS512.
signingKeyYesPath to the PEM private key (RSA or ECDSA), or for HMAC algorithms a file holding the secret. Must be inside an allowed root.

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. Changed5 schema fields changedv0.5.0
    • changedInput schema / properties / bundle / description
      Previous value: -"Path to a bundle directory or archive. Must be in an allowed root."New value: +"Path to a bundle directory or `.tar.gz` archive. Must be inside an allowed root."
    • changedInput schema / properties / claimsFile / description
      Previous value: -"Path to extra claims to include in the signature."New value: +"Path to a JSON file of extra claims to sign, such as {\"keyid\": \"...\", \"scope\": \"...\"}. Must be inside an allowed root."
    • addedInput schema / properties / outputDir
      Added value: +{
      +  "description": "For an archive, the directory that receives `.signatures.json`; defaults to the archive's own directory. Must exist and be inside an allowed root. Not accepted for a directory bundle, which is signed in place.",
      +  "type": "string"
      +}
    • changedInput schema / properties / signingAlg / description
      Previous value: -"Signing algorithm (e.g. RS256). Default: RS256."New value: +"Signing algorithm: RS256 (default), RS384, RS512, PS256, PS384, PS512, ES256, ES384, ES512, HS256, HS384, HS512."
    • changedInput schema / properties / signingKey / description
      Previous value: -"Path to the signing key."New value: +"Path to the PEM private key (RSA or ECDSA), or for HMAC algorithms a file holding the secret. Must be inside an allowed root."
  2. Addedv0.1.13
  3. Removedv0.1.5
  4. Addedv0.1.2
  5. Removedv0.1.1
  6. First observedv0.1.0

TDQS

A4.7/5.0
Behavior5/5

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

Beyond the annotations (destructiveHint=true, idempotentHint=true), the description discloses the exact mutation semantics: a directory gets `.signatures.json` written into it in place, while an archive is not modified and receives a sidecar signature in `outputDir`. It also reveals the portability caveat — files are recorded as `<directory name>/<file>` so the directory must keep its name — which no annotation could convey. No contradiction with annotations; the destructive hint is consistent with the in-place write.

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 front-loaded with the core action and then builds logically: directory behavior, archive behavior, key format, claims, return values. Each sentence carries unique operational information — no filler, no restatement of the title — and the length is justified by the tool's two distinct input modes.

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 states the return values (path written, algorithm, file count) explicitly. It covers both input types, the mutation differences, key material requirements, claims injection, and names the sibling tools that complete the signing/verification workflow. Minor edge cases like overwriting an existing `.signatures.json` are not covered, but nothing essential to calling the tool correctly is missing.

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

Parameters4/5

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

Schema coverage is 100%, so each parameter is already documented. The description adds interaction-level meaning: it explains that `bundle` may be a directory or archive, that `outputDir` applies only to archives, and that `signingKey` can be a PEM private key (RSA/ECDSA) or an HMAC secret file depending on `signingAlg`. It also ties `claimsFile` to concrete examples like `keyid` and `scope`, going beyond the schema's bare description.

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 — "Sign a bundle directory or `.tar.gz` archive with `opa sign`" — and immediately distinguishes the tool from its siblings by naming `opa_bundle_verify` (verification) and `opa_bundle_build` (build). It is not a tautology and leaves no ambiguity about what operation the tool performs.

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 clear workflow context: directories are signed in place and verified with `opa_bundle_verify` or via `opa build`/`opa run --bundle`, while signed archives come from `opa_bundle_build` with `signingKey`. The archive-versus-directory distinction tells an agent which invocation form applies. It stops short of explicit when-not-to-use exclusions, but the alternatives are named and the selection conditions are inferable.

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

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