Skip to main content
Glama

set_env

Add or update environment variables while preserving existing ones; mark values as secrets or build-time variables that require a rebuild, then apply the changes.

Instructions

Add or change environment variables (others are kept). secret=true stores the values as secrets: they can never be read back. build_time=true for variables the build needs (they require a rebuild). Then call apply_env_changes.

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": {
      "project_id": "<project_id>",
      "variables": "<variables>"
    },
    "name": "set_env"
  }
}

Input Schema

NameRequiredDescriptionDefault
secretNo
variablesYes
build_timeNo
project_idYes

Output Schema

NameRequiredDescriptionDefault
resultYes

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?

Goes well beyond the annotations: it discloses that existing variables are preserved, that secret values can never be read back (an irreversible consequence), that build_time variables trigger a rebuild, and that nothing takes effect until apply_env_changes is called. These are exactly the non-obvious behaviors an agent needs before mutating env state.

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?

Three short sentences, each earning its place: scope first, then the two flags with their effects, then the required next step. No redundancy or filler.

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?

An output schema exists, so return values need no explanation, and the description covers the mutation model, secret irreversibility, and the required apply step. Only minor omissions remain: which project_id refers to and the format of the variables map.

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?

With 0% schema description coverage, the description carries the burden and explains three of four parameters meaningfully: variables (added or changed), secret, and build_time, including their consequences. project_id is left implicit and the string value format for variables is unspecified, but the semantic gaps are minor.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

"Add or change environment variables (others are kept)" gives a specific verb and resource plus scope (merge, not replace). The closing instruction to call apply_env_changes signals this is the staging half of a two-step mutation, which separates it from list_env/unset_env, though no sibling is named explicitly.

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?

It states the required follow-up action ("Then call apply_env_changes") and conditions that select each flag: secret=true when values must never be readable, build_time=true when the build needs them. It lacks explicit when-not guidance (e.g., use unset_env to remove a variable), but the workflow context is clear.

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