Skip to main content
Glama

Copy a stored secret to a file or service

secret_write

Write stored values to allowlisted env files, JSON/YAML keys, systemd, GitHub Actions, or clipboard without exposing them. Preview changes with dry_run; first use of each target needs approval.

Instructions

Writes stored values to an allowlisted target without exposing them: env-file (local or ssh host; updates only that key, keeps comments, 0600, atomic, optional backup), json/yaml by key path, systemd EnvironmentFile drop-in, GitHub Actions secret (gh, via stdin) or the clipboard (only after the person clicks, auto-cleared). First use of each target needs approval. dry_run tells which keys would be created/updated. Returns {written, target, keys:[{key, action}]}.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
keysNosecret name → key in the target (default: the target key or the secret name)
nameNo
namesNo
targetYes
dry_runNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.3/5.0
Behavior5/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 so: it discloses that values are never exposed, that env-file edits are atomic, 0600, comment-preserving, and optionally backed up, that clipboard writes require a user click and auto-clear, and that targets are allowlisted with first-use approval. That is a rich, non-obvious safety and side-effect profile.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

A single front-loaded paragraph: purpose, then the target catalogue, then per-target behaviors, then dry_run, then the return shape. Every clause carries information, though the heavy parenthetical density makes it slightly harder to scan than it could be.

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 tool with a nested union schema and no output schema, the description supplies the return shape ({written, target, keys:[{key, action}]}), the approval gate, and the dry_run contract, which is substantial. The remaining omission is the name/names selection parameters and any error/failure behavior.

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 only 20%, so the description needs to compensate. It does explain the target kinds and dry_run semantics well beyond the schema's bare consts (e.g. 'json/yaml by key path', 'updates only that key'), but the top-level 'name' and 'names' parameters are never clarified in either place, leaving a real gap for a 5-parameter tool.

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 and resource with scope: 'Writes stored values to an allowlisted target without exposing them,' then enumerates exactly which targets. This clearly separates it from read-side siblings like secret_list or secret_use, and the no-exposure constraint signals the security posture.

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?

Gives actionable context: 'First use of each target needs approval' and 'dry_run tells which keys would be created/updated' tell the agent when to expect friction and when to preview. It does not, however, explicitly distinguish itself from secret_use or secret_request, so there is no named alternative or exclusion.

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