Skip to main content
Glama
privacyplaybook

sops-mcp

sops_rename_secret

Rename a key in an existing SOPS-encrypted secrets file while preserving its value, type, and metadata, and update dependent references that use the old key.

Instructions

Rename a key in an existing SOPS-encrypted file. Preserves the value, source type, and metadata. Updates 'from' references in any derived secrets that depend on the renamed key. 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.
new_nameYesNew key name (must match ^[A-Z][A-Z0-9_]*$ and not collide with an existing key)
old_nameYesCurrent key name
encrypted_contentYesContents of an existing 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 to lean on, the description carries the full burden and does reasonably well: it discloses an auth requirement (private key for the domain), preservation of value/source-type/metadata, and the non-obvious side effect of rewriting 'from' references in dependent secrets. It stops short of stating failure behavior, idempotency, or whether the operation can be undone.

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 short sentences, zero filler, and the core operation is front-loaded before the preservation and dependency-update details. Every clause 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 an unannotated mutation tool with four parameters and no output schema, the description covers purpose, prerequisites, preserved state, and downstream side effects. It omits return-value/result behavior and error conditions (e.g., name collision handling), which the schema only partially covers.

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 the schema already documents domain, old_name, new_name, and encrypted_content thoroughly, making 3 the baseline. The description adds marginal meaning — 'Requires a private key for the target domain' ties the domain parameter to auth, and the preservation clause hints at what old_name vs new_name carry over — but contributes no syntax or format detail beyond the schema.

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 ('Rename a key in an existing SOPS-encrypted file') and then enumerates the distinct semantics — value/type/metadata preservation and propagation to derived secrets — which cleanly separates it from siblings like sops_add_secrets, sops_delete_secrets, and sops_rotate_generated.

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?

Usage is implied (rename a key when its name must change) and one prerequisite is given — a private key for the target domain. However, it never states when to prefer this over alternatives such as delete+add, nor does it name related tools like sops_list_domains or sops_create_secrets, leaving routing to inference.

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