Skip to main content
Glama

Set environment variables

set_env_vars
Destructive

Set environment variables on an app or agent. plain_vars sets plain configuration, name to value, at once; plain values are readable from the dashboard, so a name or value that looks like a secret, such as STRIPE_KEY, an sk_live_ key, or a URL with a password, is refused there. For a secret, such as an API key, pass its name in secret_names and say plainly in reason why it is needed: the answer carries a request whose url the person opens, signed in to Valet, to enter each value. Valet stores each as an encrypted secret when they do. Give the person the url, then follow the request with get_request. Never ask the person to type a secret into this conversation. A call may carry both plain_vars and secret_names, but a name belongs in only one. Setting a name that exists replaces its value, which is why this is destructive. If the service is running, Valet restarts it once when plain values are set and once more when the person completes the request; a stopped or idle service reads them on its next start, and if a restart fails, call restart_service. The answer names variables and never values. Requires connecting a Valet account.

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": {
      "name": "<name>"
    },
    "name": "set_env_vars"
  }
}

Input Schema

NameRequiredDescriptionDefault
nameYesThe app's or agent's name.
reasonNoShown to the person on the request page to explain why the values are needed, so they can decide whether to enter them, such as: The app charges cards and needs your Stripe key.
org_nameNoThe Valet organization it belongs to. Omit to use the organization the account joined first.
plain_varsNoSettings the service reads that are safe to show, such as LOG_LEVEL to debug, as variable name to value. They apply without a person, but anyone in the dashboard can read them, so put a secret in secret_names instead. Setting a name that exists replaces its value.
secret_namesNoThe secrets the service needs, named by variable, such as STRIPE_KEY. The person types each value on the request page, so no value passes through this conversation.

Output Schema

NameRequiredDescriptionDefault
orgYesName of the Valet organization the call acted in.
setNoNames of the plain variables this call set, sorted. Absent when plain_vars was not given. Never values.
nameYesName of the app or agent the variables were set on.
requestNoThe request a person completes in the dashboard to enter a value that must not pass through this conversation. Absent when nothing needs a person.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / reason / description
      Previous value: -"Why the request is made, in words the person reads on the request page before entering anything, so they know what the values are for, such as: The app charges cards and needs your Stripe key."New value: +"Shown to the person on the request page to explain why the values are needed, so they can decide whether to enter them, such as: The app charges cards and needs your Stripe key."
  2. Changed3 schema fields changed
    • changedInput schema / properties / plain_vars / description
      Previous value: -"Plain configuration to set at once, as variable name to value, such as LOG_LEVEL to debug. Plain values are readable from the dashboard, so a secret goes in secret_names. A name that exists is replaced."New value: +"Settings the service reads that are safe to show, such as LOG_LEVEL to debug, as variable name to value. They apply without a person, but anyone in the dashboard can read them, so put a secret in secret_names instead. Setting a name that exists replaces its value."
    • changedInput schema / properties / reason / description
      Previous value: -"Why the request is made, in the words the person reads on the request page, such as: The app charges cards and needs your Stripe key."New value: +"Why the request is made, in words the person reads on the request page before entering anything, so they know what the values are for, such as: The app charges cards and needs your Stripe key."
    • changedInput schema / properties / secret_names / description
      Previous value: -"Names of secret variables, such as STRIPE_KEY, for the person to enter on the request page. Never values."New value: +"The secrets the service needs, named by variable, such as STRIPE_KEY. The person types each value on the request page, so no value passes through this conversation."
  3. Changed2 schema fields changed
    • changedInput schema / properties / plain_vars / description
      Previous value: -"Plain configuration to set at once, as variable name to value, such as LOG_LEVEL to debug. Readable from the dashboard, so never a secret: a name or value that looks like one is refused. A name that exists is replaced. A name may not also appear in secret_names."New value: +"Plain configuration to set at once, as variable name to value, such as LOG_LEVEL to debug. Plain values are readable from the dashboard, so a secret goes in secret_names. A name that exists is replaced."
    • changedInput schema / properties / reason / description
      Previous value: -"Why the request is made, in the words the person reads on the request page, such as: The app charges cards and needs your Stripe key. Give it with secret_names."New value: +"Why the request is made, in the words the person reads on the request page, such as: The app charges cards and needs your Stripe key."
  4. Changed1 schema field changed
    • changedInput schema / properties / reason / description
      Previous value: -"Give it with secret_names. Why the request is made, in the words the person reads on the request page, such as: The app charges cards and needs your Stripe key."New value: +"Why the request is made, in the words the person reads on the request page, such as: The app charges cards and needs your Stripe key. Give it with secret_names."
  5. Changed1 schema field changed
    • changedInput schema / properties / reason / description
      Previous value: -"Give it with secret_names. Why the value is needed, in the words the person reads on the request page, such as: The app charges cards and needs your Stripe key."New value: +"Give it with secret_names. Why the request is made, in the words the person reads on the request page, such as: The app charges cards and needs your Stripe key."
  6. Changed1 schema field changed
    • changedInput schema / properties / reason / description
      Previous value: -"Give it with secret_names. One plain sentence, shown to the person on the request page, saying why the value is needed, such as: The app charges cards and needs your Stripe key."New value: +"Give it with secret_names. Why the value is needed, in the words the person reads on the request page, such as: The app charges cards and needs your Stripe key."
  7. Changed12 schema fields changed
    • changedInput schema / properties / name / description
      Previous value: -"Required. The app's or agent's name."New value: +"The app's or agent's name."
    • changedInput schema / properties / plain_vars / description
      Previous value: -"Plain configuration to set at once, as variable name to value, such as LOG_LEVEL to debug. Readable from the dashboard: never a secret."New value: +"Plain configuration to set at once, as variable name to value, such as LOG_LEVEL to debug. Readable from the dashboard, so never a secret: a name or value that looks like one is refused. A name that exists is replaced. A name may not also appear in secret_names."
    • changedInput schema / properties / reason / description
      Previous value: -"Required with secret_names. One plain sentence, shown to the person on the request page, saying why the value is needed, such as: The app charges cards and needs your Stripe key. At most 280 characters."New value: +"Give it with secret_names. One plain sentence, shown to the person on the request page, saying why the value is needed, such as: The app charges cards and needs your Stripe key."
    • addedOutput schema / properties / name / description
      Added value: +"Name of the app or agent the variables were set on."
    • addedOutput schema / properties / org / description
      Added value: +"Name of the Valet organization the call acted in."
    • addedOutput schema / properties / request / description
      Added value: +"The request a person completes in the dashboard to enter a value that must not pass through this conversation. Absent when nothing needs a person."
    • addedOutput schema / properties / request / properties / expires_at / description
      Added value: +"When the request expires unanswered, as an RFC 3339 UTC time."
    • addedOutput schema / properties / request / properties / fields / description
      Added value: +"Names of what the person enters, never values."
    • addedOutput schema / properties / request / properties / id / description
      Added value: +"Id of the request. Pass it to get_request to follow the request."
    • addedOutput schema / properties / request / properties / next_step / description
      Added value: +"What to do next: give the person the url, then follow the request with get_request."
    • addedOutput schema / properties / request / properties / url / description
      Added value: +"Dashboard page to give the person. They open it signed in to Valet to complete the request. It holds no credential."
    • addedOutput schema / properties / set / description
      Added value: +"Names of the plain variables this call set, sorted. Absent when plain_vars was not given. Never values."
  8. Changed9 schema fields changed
    • addedInput schema / properties / plain_vars
      Added value: +{
      +  "additionalProperties": {
      +    "type": "string"
      +  },
      +  "description": "Plain configuration to set at once, as variable name to value, such as LOG_LEVEL to debug. Readable from the dashboard: never a secret.",
      +  "type": "object"
      +}
    • addedInput schema / properties / reason
      Added value: +{
      +  "description": "Required with secret_names. One plain sentence, shown to the person on the request page, saying why the value is needed, such as: The app charges cards and needs your Stripe key. At most 280 characters.",
      +  "maxLength": 280,
      +  "type": "string"
      +}
    • removedInput schema / properties / secret
      Removed value: -{
      -  "description": "Whether to store the values as secrets, which are encrypted and never shown again. Omit for true; pass false for plain configuration, readable from the dashboard.",
      -  "type": "boolean"
      -}
    • addedInput schema / properties / secret_names
      Added value: +{
      +  "description": "Names of secret variables, such as STRIPE_KEY, for the person to enter on the request page. Never values.",
      +  "items": {
      +    "type": "string"
      +  },
      +  "maxItems": 20,
      +  "type": "array"
      +}
    • removedInput schema / properties / vars
      Removed value: -{
      -  "additionalProperties": {
      -    "type": "string"
      -  },
      -  "description": "Required. Variable name to value.",
      -  "type": "object"
      -}
    • changedInput schema / required
      Previous value: -[
      -  "name",
      -  "vars"
      -]New value: +[
      +  "name"
      +]
    • removedOutput schema / properties / kind
      Removed value: -{
      -  "type": "string"
      -}
    • addedOutput schema / properties / request
      Added value: +{
      +  "additionalProperties": false,
      +  "properties": {
      +    "expires_at": {
      +      "type": "string"
      +    },
      +    "fields": {
      +      "items": {
      +        "type": "string"
      +      },
      +      "type": [
      +        "null",
      +        "array"
      +      ]
      +    },
      +    "id": {
      +      "type": "string"
      +    },
      +    "next_step": {
      +      "type": "string"
      +    },
      +    "url": {
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "id",
      +    "url",
      +    "expires_at",
      +    "fields",
      +    "next_step"
      +  ],
      +  "type": [
      +    "null",
      +    "object"
      +  ]
      +}
    • changedOutput schema / required
      Previous value: -[
      -  "org",
      -  "name",
      -  "set",
      -  "kind"
      -]New value: +[
      +  "org",
      +  "name"
      +]
  9. Changed1 schema field changed
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "additionalProperties": false,
      +  "properties": {
      +    "kind": {
      +      "type": "string"
      +    },
      +    "name": {
      +      "type": "string"
      +    },
      +    "org": {
      +      "type": "string"
      +    },
      +    "set": {
      +      "items": {
      +        "type": "string"
      +      },
      +      "type": [
      +        "null",
      +        "array"
      +      ]
      +    }
      +  },
      +  "required": [
      +    "org",
      +    "name",
      +    "set",
      +    "kind"
      +  ],
      +  "type": "object"
      +}
  10. Changed2 schema fields changed
    • removedInput schema / properties / kind
      Removed value: -{
      -  "description": "How to store them. Omit for secret.",
      -  "enum": [
      -    "secret",
      -    "plain"
      -  ],
      -  "type": "string"
      -}
    • addedInput schema / properties / secret
      Added value: +{
      +  "description": "Whether to store the values as secrets, which are encrypted and never shown again. Omit for true; pass false for plain configuration, readable from the dashboard.",
      +  "type": "boolean"
      +}
  11. Added

TDQS

A4.4/5.0
Behavior3/5

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

Annotations already declare destructiveHint=true, readOnlyHint=false and openWorldHint=false, and the description reinforces the destructive aspect by explaining that setting an existing name replaces its value. It adds genuinely useful operational detail beyond the annotations: restarts happen once per plain set and once more when the person completes the request, a failed restart needs restart_service, and results name variables but never values. However, the repetition of what annotations already cover and the absence of a clear normative statement about the required Valet account connection beyond a single sentence keeps it from the top of the scale.

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-loaded with the core distinction and organized around a clear workflow, but it is long and repeats points already in the schema, notably that plain values are dashboard-readable and that a secret must never be typed into the conversation. Every sentence is actionable, but several restate schema text.

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 destructive, multi-path tool with nested objects and five parameters, the description covers the full lifecycle: input placement rules, the out-of-band request flow, restart consequences, failure handling, and what the response will and will not contain. Return-value detail is not needed because an output schema exists.

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 already carries parameter meaning, and the description mostly mirrors it. It still adds value: the refusal rule for secret-looking plain values (STRIPE_KEY, sk_live_ keys, URLs with passwords), the exclusivity constraint between plain_vars and secret_names, and the explanation that reason is shown to the person on the request page.

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?

Opens with a specific verb and resource plus scope: 'Set environment variables on an app or agent.' It immediately splits the operation into two modes (plain_vars vs secret_names) and names the collaborators (get_request, restart_service), so an agent knows exactly what this tool does without opening the 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 explicit routing rules: plain configuration goes in plain_vars, secrets go in secret_names with a reason, and a name may appear in only one of the two. It also prescribes the follow-up sequence (hand over the url, then call get_request) and the failure path (call restart_service if a restart fails).

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