Skip to main content
Glama

Set variables and secrets

set_env
DestructiveIdempotent

Sets or removes an environment's variables and secrets (in the vault by default, never read back); they apply at the next deployment. get_environment { view: "variables" } reads their names.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "set_env"
  }
}

Input Schema

NameRequiredDescriptionDefault
keyNoA single variable: its name (with "value"), instead of "values".
fileNotrue: a secret delivered as a file, never as a variable: the app reads it in /run/secrets/<NAME>. Required for a secret in the production of a project linked to a federated connection.
moveNoA name: this secret moves to the build (build: true) or to the app, its value kept in the vault.
buildNotrue: a build secret (build.secrets, e.g. NPM_TOKEN), read by builds only, never by the app. With delete: removes one.
trialNoThe key returned by the call that created the trial (deploy_app, upload_source or write_files: trial_key), passed again on each call.
valueNoA single variable: its value (with "key").
deleteNoNames of the variables or secrets to delete from this environment.
secretNotrue: in the vault, never read back (default). false: plain variable, which a person reads back in while, never an agent.
valuesNoKey/value pairs. Example: { "LOG_LEVEL": "debug" }
projectNoThe project.
environmentNoProduction or a preview.production

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / trial / description
      Previous value: -"The key returned by the first deploy_app (trial_key), passed again on each call."New value: +"The key returned by the call that created the trial (deploy_app, upload_source or write_files: trial_key), passed again on each call."
  2. Changed1 schema field changed
    • changedInput schema / properties / secret / description
      Previous value: -"true: in the vault, never read back (default). false: plain variable, readable on screen."New value: +"true: in the vault, never read back (default). false: plain variable, which a person reads back in while, never an agent."
  3. First observed

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already declare destructiveHint=true and idempotentHint=true; the description adds behavior the annotations cannot express: values land in the vault by default and are never read back, and changes only take effect at the next deployment. It does not discuss partial-failure behavior when setting multiple keys or what a delete of a nonexistent name does.

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?

Two tight sentences with the core action and the deployment-timing consequence front-loaded, then the read-path pointer. Nothing is redundant with the title or schema.

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 11-parameter, destructive, nested-schema tool the description covers the highest-risk facts: secrets are unreadable afterward, and effects are deferred to the next deployment. Remaining detail (trial tokens, move/build semantics, delete limits) is fully documented in the schema, so nothing critical is missing.

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 baseline is 3; the description earns an increment by explaining the vault/never-read-back concept that gives meaning to the secret default and by pointing to get_environment for verification. It does not clarify how the key/value and values parameters relate, leaving that entirely to 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?

States a specific verb pair and resource: 'Sets or removes an environment's variables and secrets'. It also explicitly distinguishes itself from the read path by naming get_environment with view: "variables", so an agent can route 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 Guidelines4/5

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

Gives a clear use condition (writing/removing) and names the alternative for the opposite need (get_environment for reading names). It does not spell out when-not to use it (e.g. for build-time vs runtime config), so it falls short of a full when/when-not/alternatives treatment.

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.

Resources