Skip to main content
Glama

sops_create_k8s_secret

Create a Kubernetes Secret manifest with SOPS-encrypted stringData, leaving metadata and type readable so sops, ksops, or Flux can decrypt it into an applyable manifest.

Instructions

Create a Kubernetes Secret manifest (apiVersion v1, kind Secret) with its values under stringData, SOPS-encrypted so that only data/stringData is ciphertext and apiVersion, kind, metadata and type stay readable. The result decrypts with sops -d, ksops or Flux straight into an applyable manifest; commit it exactly as returned. Secrets take the same sources as sops_create_secrets. The file is create-only: every other mutation tool refuses it, so to change or rotate anything, call this tool again with the full set. Metadata (domain, sources, generation parameters, never a value) goes in the sops-mcp.privacyplaybook.com/meta annotation.

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": {
      "name": "<name>",
      "secrets": "<secrets>"
    },
    "name": "sops_create_k8s_secret"
  }
}

Input Schema

NameRequiredDescriptionDefault
nameYesmetadata.name: a lowercase RFC 1123 DNS subdomain
typeNoSecret type, e.g. Opaque or kubernetes.io/tlsOpaque
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.
labelsNometadata.labels (optional)
secretsYesSecrets to place under stringData
namespaceNometadata.namespace (optional): a lowercase RFC 1123 DNS label
annotationsNometadata.annotations (optional). sops-mcp.privacyplaybook.com/meta is reserved.

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. Addedv0.12.0

TDQS

A4.2/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 discloses encryption scope, decrypt compatibility with sops/ksops/Flux, create-only refusal by other mutation tools, the need to resubmit the full set for changes, and metadata annotation rules. It omits auth requirements, error behavior, duplicate-file handling, and exact response shape.

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 and every sentence contributes operational detail: encryption layout, commit behavior, source compatibility, create-only semantics, and metadata placement. It is dense but appropriately sized for a complex create tool, with no fluff.

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?

No output schema or annotations exist, so the description must carry behavioral context; it covers encryption semantics, mutation constraints, metadata, and commit requirements well. It still leaves return shape and failure modes unexplained, which is a meaningful but not fatal gap.

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 coverage is 100%, so most parameter meaning is already supplied by the schema. The description adds only the annotation content rule and the source equivalence with sops_create_secrets, without adding significant detail beyond structured fields.

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?

Names a specific verb and resource: create a Kubernetes Secret manifest, with precise SOPS ciphertext layout. It clearly separates this from generic secret creation and from mutation siblings via the create-only note.

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?

States create-only behavior and that rotation requires calling the same tool again with the full set, and points to sops_create_secrets as a source-compatible reference. It does not explicitly compare sops_create_oidc_secret or spell out when to choose generic secret creation instead, leaving a small gap.

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