Skip to main content
Glama

Store an app secret

set_app_secret
DestructiveIdempotent

Store a sensitive value (an API key, a token, a password, a connection string) for one app. Use this instead of set_app_variable whenever the value would be damaging if someone else read it. The value is encrypted at rest, is injected into the app's environment under the name you give, and the app restarts to pick it up. Storing a secret takes effect on the next boot, so call this before telling the user the app is ready. No tool returns a stored value. Two things to tell the user before you call it. First, this token can write secrets to every app on their account, not only this one. Second, any value they give you has passed through your context, so prefer a value you read from a local file such as .env over one you asked them to type into the chat, and suggest they rotate anything that was pasted. If the vault key name is already used by a different app, this call is refused rather than overwriting it, and the message tells you what to pass as vault_key_name.

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": {
      "app_id": "<app_id>",
      "name": "<name>",
      "value": "<value>"
    },
    "name": "set_app_secret"
  }
}

Input Schema

NameRequiredDescriptionDefault
nameYesThe environment variable name the app code reads, for example STRIPE_SECRET_KEY
valueYesThe secret value. It is encrypted at rest and is never returned by any tool.
app_idYesThe app id returned by list_apps
vault_key_nameNoOptional name for the stored value in the account vault. Defaults to name. Pass an explicit one when the default is already used by another app.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.6/5.0
Behavior5/5

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

Goes well past the annotations (readOnly=false, destructive=true, idempotent=true): encryption at rest, injection into the environment under the given name, an app restart on next boot, no tool ever returning the value, and a refusal rather than overwrite on vault key collision. It also discloses account-wide blast radius of the token and advises disclosure to the user, which annotations cannot convey.

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?

Front-loads purpose and the sibling distinction, then the boot/restart consequence, then the security caveats. It runs long (roughly 180 words) and the 'Two things to tell the user' block is verbose, 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 four-parameter mutation tool with no output schema, it covers timing (effective next boot), failure mode (collision refusal with a stated remedy), return behavior (no value ever returned), and the user-facing warnings. Nothing an agent needs to call it safely 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 coverage is 100%, so name, value, app_id, and vault_key_name are already documented, and the description largely restates the vault_key_name collision behavior the schema describes. It adds only mild extra meaning, such as when the default should be overridden and that the stored name becomes the environment variable, so baseline 3 applies.

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 ('Store a sensitive value ... for one app') and enumerates the value kinds (API key, token, password, connection string). It explicitly distinguishes itself from set_app_variable, so an agent can route correctly without opening either schema.

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?

Gives an explicit selection rule against the nearest sibling ('use this instead of set_app_variable whenever the value would be damaging if someone else read it') plus an ordering rule ('call this before telling the user the app is ready'). Both when-to-use and the alternative condition are stated outright.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.