Skip to main content
Glama
Apprua

Apprua

Official

Set an environment variable or secret

set_env
Idempotent

Stores an app's environment variable or secret server-side and restarts the app so the new value takes effect without writing it into code.

Instructions

Sets an environment variable / secret of the app (e.g. an API key or a database password) and restarts it. The value is stored on the server, never in the code, and is never shown back. Ask the user for the value; do not write it in any file.

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>",
      "key": "<key>",
      "value": "<value>"
    },
    "name": "set_env"
  }
}

Input Schema

NameRequiredDescriptionDefault
keyYesUPPER_CASE name, e.g. OPENAI_API_KEY
nameYesApp name = sub-domain, e.g. "my-notes" (lowercase letters, digits, dashes)
valueYes
restartNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.9/5.0
Behavior4/5

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

Annotations already cover idempotency, destructiveness, and open-world reach, so the bar is lower, and the description still adds real behavior: the value lives server-side, never in code, and is 'never shown back' (write-only secret), plus the app is restarted as a side effect. It does not state what happens when overwriting an existing key or whether the restart is disruptive, which keeps it below a 5.

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?

Three short sentences, front-loaded with the action and immediately followed by the storage/visibility guarantee and the sourcing instruction. Nothing is redundant, though the unconditional 'restarts it' phrasing slightly muddies the parameter picture.

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 a mutation tool with no output schema, the description covers the essentials an agent needs: secret handling, non-echo of the value, and the restart side effect. Gaps remain on overwrite semantics, permission requirements, and the restart toggle, but the core behavior is adequately disclosed.

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 50% – name and key are documented in the schema, while value and restart are not. The description partly compensates by establishing that value is a sensitive secret the agent must obtain from the user and never persist, but it describes the app as always restarting, which does not clarify the optional restart flag whose default is true.

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?

The description gives a specific verb and resource ('Sets an environment variable / secret of the app') plus concrete examples (API key, database password), which clearly separates it from siblings like unset_env or restart_app. It does not explicitly name an alternative tool, so it stops short of a 5.

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 gives explicit operational guidance for the interaction: 'Ask the user for the value; do not write it in any file.' That tells the agent how to source the value and what to avoid. There is no explicit when-not-to-use or reference to the unset/update alternatives, so it is clear context rather than full routing guidance.

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