Skip to main content
Glama

sops_add_secrets

Add new generated, external, or derived secrets to an existing SOPS-encrypted file by decrypting it, merging the values, and re-encrypting without overwriting existing keys.

Instructions

Add new secrets to an existing SOPS-encrypted file. Decrypts the file, merges in new secrets, and re-encrypts — preserving all existing values and metadata. Rejects keys that already exist in the file. Supports generated, external, and derived sources. Requires a private key for the target domain.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "encrypted_content": "<encrypted_content>",
      "secrets": "<secrets>"
    },
    "name": "sops_add_secrets"
  }
}

Input 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.
secretsYesNew secrets to add
encrypted_contentYesContents of an existing secrets.enc.yaml file

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv0.12.1
    • changedInput schema / properties / secrets / items / properties / charset / description
      Previous value: -"Character set for generated secrets"New value: +"Character set for generated secrets. 'base64' is a 64-character alphabet (letters, digits, '+', '/'), not base64 encoding; 'urlsafe' is the same size with '-' and '_' instead, safe in URLs. A secret under 64 bits of entropy (length x log2(charset size)) is still created, with a warning in the response."
    • changedInput schema / properties / secrets / items / properties / charset / enum
      Previous value: -[
      -  "alphanumeric",
      -  "alphanumeric_symbols",
      -  "hex",
      -  "base64",
      -  "numeric"
      -]New value: +[
      +  "alphanumeric",
      +  "alphanumeric_symbols",
      +  "hex",
      +  "base64",
      +  "urlsafe",
      +  "numeric"
      +]
  2. 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"
      +}
  3. First observedv0.10.0

TDQS

A3.8/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 burden and does well: it discloses the decrypt-merge-re-encrypt cycle, that existing values and metadata are preserved, that duplicate keys are rejected, and that a private key is required. Gaps remain on failure behavior (partial writes, atomicity) and on how the result is surfaced, since no output schema exists.

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?

Four short sentences, each carrying distinct information: what it does, the mechanism, the merge/preservation guarantee, the duplicate-key rule, the supported sources, and the key prerequisite. Nothing is redundant or buried.

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 important side effects and the private-key prerequisite well. It stops short of describing the return shape or what happens to the encrypted file on error, which is the main remaining unknown for an agent.

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, source, charset, transform, and the rest in detail. The description only restates the three source types at a high level, adding no format or interaction detail beyond the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource ('Add new secrets to an existing SOPS-encrypted file') and scopes it to existing files, which implicitly separates it from sops_create_secrets. It does not explicitly name any sibling or contrast with sops_update_external, so the differentiation is inferred rather than stated.

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 line 'Rejects keys that already exist in the file' effectively implies that updating an existing key is someone else's job, and 'Requires a private key for the target domain' gives a prerequisite. However, no alternative tool is named and there is no explicit when-not guidance, leaving the agent to infer the update path.

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