Skip to main content
Glama

promote_secret

DestructiveIdempotent

Copies a secret's value from one environment to another without exposing it outside the keyring. Avoids overwriting a differing target unless force is enabled; no-op when values already match.

Instructions

[secrets] Copy one secret's value from a source environment to a target environment (superposition states), e.g. staging → prod, without the value ever leaving the keyring. Use when an environment must match another for a single key; use diff_environments first to see what differs. Refuses to overwrite a differing target unless force is true; a target that already matches is a no-op. Mutates the keyring (one 'write' audit event, hooks fire) only when the target changes. Returns { key, scope, from, to, previous: 'absent'|'same'|'different', changed }. Never returns the value.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
toYesTarget environment state. Example: 'prod'.
keyYesSecret key name. Example: 'DATABASE_URL'.
fromYesSource environment state. Example: 'staging'.
forceNoOverwrite a differing target value. Default false → the call fails with ERR_PROMOTE_CONFLICT instead.
orgIdNoOrganization identifier for org-scoped secrets. Required only when scope='org'. Example: 'acme-corp'.
scopeNoWhere the secret lives. 'global' = user keyring (default if omitted on reads), 'project' = scoped to projectPath, 'team' = team-shared (needs teamId), 'org' = org-shared (needs orgId).global
teamIdNoTeam identifier for team-scoped secrets. Required only when scope='team'. Example: 'acme-platform'.
projectPathNoAbsolute path to the project root for project-scoped secrets and policy resolution. Defaults to the MCP server's current working directory when omitted.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.18.0

TDQS

A4.9/5.0
Behavior5/5

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

The description goes well beyond the annotations. It discloses that the tool mutates the keyring, emits one 'write' audit event, fires hooks, refuses to overwrite a differing target unless force is true, and is a no-op when the target already matches. It also states the return shape and explicitly guarantees 'Never returns the value', which is critical security-relevant behavior. The annotations (destructiveHint=true, idempotentHint=true) are consistent with and enriched by this description.

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 dense but every sentence earns its place: purpose, usage context, conflict behavior, mutation side effects, and return shape. It front-loads the core action and example before diving into edge cases. No filler or repetition of schema content.

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?

For a mutation tool with no output schema, the description is remarkably complete. It covers the operation, the conflict semantics, the side effects (audit event, hooks), the no-op case, and the exact return shape. An agent has everything needed to decide whether to call it and what to expect. The only minor omission is not naming the sibling set_secret as an alternative for direct value setting, but the environment-copy framing already distinguishes it.

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 the schema already documents all 8 parameters. The description adds value by explaining the semantic relationship between from/to (source vs target environment states) and the force flag's conflict behavior. It doesn't repeat parameter-level details, which is appropriate given full schema coverage. A small gap: it doesn't explain how scope/projectPath/teamId/orgId interact with the promotion, but the schema covers those individually.

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: 'Copy one secret's value from a source environment to a target environment (superposition states)'. It clearly distinguishes this from siblings like set_secret, get_secret, and diff_environments by framing it as an environment-to-environment copy operation. The example 'staging → prod' makes the purpose immediately concrete.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description explicitly states when to use the tool ('Use when an environment must match another for a single key') and names the alternative to use first ('use `diff_environments` first to see what differs'). It also explains the force flag behavior and the no-op case, giving an agent clear decision criteria for invocation.

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