Skip to main content
Glama

Set environment variables

set_env
Destructive

Add, update, or remove a spawnpoint project's environment variables without a redeploy: set upserts variables (everything not named is untouched), unset removes by name. Values are stored sealed, survive every later redeploy, and reach the app as its environment variables; a running app is restarted with the new environment right away, and a sleeping project is woken to apply it, so expect the call to take a few seconds. During a deploy in progress the change is saved and applies when that deploy finishes; a project whose deploy failed stores it for its next deploy; a terminated project keeps no variables, so nothing is stored, and a new deploy under its name starts with none. The note says which happened, and none of these is a failure. deploy_project's env parameter feeds the same store, so pass env at deploy time when you have it and use this tool to change a variable on a live app. Returns the variable names now set; values are write-only and never returned. Never hardcode a secret into a project file; set it here instead. Refused on a static site, which runs nothing that could read a variable.

Input Schema

NameRequiredDescriptionDefault
setNovariables to add or update, name to value. Merged with what is already stored: variables not named here are untouched
unsetNovariable names to remove. A name may not also appear in set: such a call is refused. A name that is not set is ignored, and a call that only unsets such names changes nothing and does not restart the app
project_idYesthe id of the project

Output Schema

NameRequiredDescriptionDefault
noteNo
namesYes
project_idYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.8/5.0
Behavior5/5

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

Annotations declare destructiveHint=true and idempotentHint=false; the description is consistent and goes well beyond them, covering sealed storage, survival across redeploys, immediate restart of a running app, waking a sleeping project (with an expected few-second latency), and the four deploy-state outcomes including terminated projects storing nothing. It also flags that values are write-only and never returned, which is exactly the kind of disclosure annotations cannot carry.

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 core mutation semantics and the deploy_project split are front-loaded in the first two sentences, and the deploy-state enumeration is genuinely load-bearing rather than filler. The single paragraph is dense and the chain of in-progress/failed/terminated cases is long enough that an agent may skim it, so it stops short of a 5.

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?

This is a destructive, non-idempotent mutation with nested object parameters, and the description covers safety, timing, restart side effects, edge-case deploy states, the static-site refusal, and the fact that values are write-only. With an output schema present it need not explain return values, and it still notes that names are returned, so nothing an agent needs 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.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the baseline is 3, but the description adds real meaning on top: it reiterates the merge/untouched semantics for `set` and the by-name removal for `unset` in the context of the tool's overall behavior, and it clarifies that the returned names reflect the store rather than the payload. It does not add syntax or size limits beyond what the schema already states, keeping it short of a 5.

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 opening sentence names a specific verb set (add/update/remove) against a specific resource (a spawnpoint project's environment variables) and immediately disambiguates the two mutation modes: `set` upserts, `unset` removes by name. It also distinguishes itself from the deploy-time path by naming deploy_project's env parameter, so an agent can pick the right tool without opening a 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?

It gives an explicit rule for choosing between this tool and the sibling: pass env at deploy time when you have it, use this tool to change a variable on a live app. It also states a hard exclusion (refused on a static site, which runs nothing that could read a variable) and a policy directive (never hardcode a secret into a project file; set it here instead).

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.