Skip to main content
Glama
privacyplaybook

sops-mcp

sops_add_metadata

Adds missing _meta_unencrypted metadata to an existing SOPS-encrypted file by decrypting, adding metadata, and re-encrypting while preserving plaintext values.

Instructions

Add _meta_unencrypted metadata to an existing SOPS-encrypted file that lacks it. Decrypts the file, adds metadata, and re-encrypts preserving original plaintext values. Requires a private key for the target domain.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
domainNoName of the key domain to encrypt to / decrypt with. Optional. Defaults to the domain recorded in the file's _meta_unencrypted block, and failing that to 'default'. Call sops_list_domains to see what this server has configured.
secret_metadataYesMapping of key names to metadata. Each value has 'source' ('generated', 'external', or 'derived') and optional 'description'. For 'derived', also provide 'transform' and 'from'.
encrypted_contentYesContents of a secrets.enc.yaml file

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.11.0
    • addedInput schema / properties / domain
      Added value: +{
      +  "description": "Name of the key domain to encrypt to / decrypt with. Optional. Defaults to the domain recorded in the file's _meta_unencrypted block, and failing that to 'default'. Call sops_list_domains to see what this server has configured.",
      +  "type": "string"
      +}
  2. First observedv0.10.0

TDQS

A4/5.0
Behavior4/5

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

With no annotations, the description carries the full load and does well: it discloses the decrypt–modify–re-encrypt pipeline, that original plaintext values are preserved, and that a private key for the target domain is required. It omits edge-case behavior such as what happens when the file already contains metadata, keeping it just below a 5.

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?

Three tight sentences: purpose first, mechanics second, prerequisite last. No redundancy and every sentence earns its place.

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 mutation tool with no annotations and no output schema, the description covers the operation, preservation guarantee, and key requirement. It would be fully complete with a note on what is returned (re-encrypted content) and behavior when metadata already exists.

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 domain, secret_metadata, and encrypted_content in detail, including enum values and nested structure. The description adds only the private-key requirement for the domain parameter, which is useful but marginal; baseline 3 applies.

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 (add _meta_unencrypted metadata) and resource (existing SOPS-encrypted file), with a clear precondition ('that lacks it') and the transformation performed. This distinguishes it from siblings like sops_add_secrets and sops_update_external, which operate on different content.

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 phrase 'existing SOPS-encrypted file that lacks it' implies the situation in which this tool applies, and the private-key requirement gives a prerequisite. However, no alternative tool is named and no explicit when-not guidance (e.g., what to use if metadata already exists) is provided.

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