Skip to main content
Glama

Add a write-only secret to a workspace's vault

set_vault_secret

Stores an encrypted, write-only secret in a workspace vault for use via opaque handles in code and integrations; requires confirmation and a pre-created vault.

Instructions

Stores a secret in the workspace's vault. WRITE-ONLY: the value is encrypted server-side and can never be read back — not by this tool, not by block code, not by you. Block code gets an opaque handle . that the server dereferences at the point of use (sql.query, a fetch header, a {{Vault.secret}} URL placeholder, crypto.hmacSha256), and logs show ***. kind:"string" for a token/password/API key; kind:"connection" for a database connection string, which also needs provider (postgres|sqlserver|oracle|mysql|sqlite). Requires confirm=true. NEVER invent a secret value — ask the user for it. Create the vault first with create_vault. Only the workspace OWNER can.

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": {
      "workspaceId": "<workspaceId>",
      "name": "<name>",
      "kind": "<kind>",
      "value": "<value>"
    },
    "name": "set_vault_secret"
  }
}

Input Schema

NameRequiredDescriptionDefault
kindYes"string" for a token/password; "connection" for a DB connection string.
nameYesSecret name as referenced in code, e.g. "prodDb" → MyVault.prodDb.
valueYesThe secret itself. Stored encrypted; never readable again. Get it from the user.
confirmNoMust be true to store the secret. Omit/false returns a preview only.
providerNoRequired for kind:"connection" — which database the connection string targets.
workspaceIdYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.53.0

TDQS

A4.6/5.0
Behavior5/5

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

No annotations are supplied, so the description carries the full burden and does so: encrypted server-side, never readable back, dereferenced only as an opaque <vaultName>.<secretName> handle at specific use sites, and masked as *** in logs. It also discloses the confirm gate (missing confirm yields a preview, not a write) and the owner-only permission requirement — mutation side effects and auth are both covered.

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?

The write-only constraint is front-loaded in the first two clauses, before the mechanics, which is the right order. It is dense and slightly run-on — the parenthetical list of use sites (sql.query, fetch header, URL placeholder, hmacSha256) plus provider enum repeat could be trimmed — but no sentence is filler.

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 six-parameter mutation with no annotations and no output schema, everything an agent needs is present: permissions, the confirm gate, prerequisite ordering, value provenance, and what the caller gets back conceptually (an opaque handle, never the value). Nothing required to call it correctly is missing.

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 83%, so the schema already documents name, value, kind, provider and confirm; the description largely restates the kind/provider split rather than adding syntax or format detail. The one genuine addition is the handle naming shape <vaultName>.<secretName>, which clarifies how `name` surfaces in code. Baseline 3 is appropriate given the schema does the heavy lifting.

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 — 'Stores a secret in the workspace's vault' — and immediately qualifies it with the write-only trait that defines the tool. It names the prerequisite sibling (create_vault) and the read-side counterpart exists implicitly via 'can never be read back', so an agent can place it precisely among create_vault / list_vault_secrets.

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?

Explicit when-to-use and when-not rules: choose kind:"string" for tokens/passwords/API keys vs kind:"connection" for DB strings, call create_vault first, confirm=true is mandatory, and only the workspace OWNER may call it. It also forbids the common failure mode — 'NEVER invent a secret value — ask the user for it.'

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