Skip to main content
Glama

env_vars

Manage agent environment variables across staging and prod config branches: list, create, update, delete rows, and reveal masked secrets with audit logging.

Instructions

CRUD for agent_env_vars — a third env-var lookup location (behind os.environ) resolved by core.env_resolver. env selects which branch DB to operate on (client_for_env); row_environment is the row's own environment column and defaults to env when omitted (environment is its deprecated alias, still accepted). Secret rows (is_secret=true) are masked to "••••" in list/get output AND in audit before/after payloads, exactly like the portal's /admin/env Variables tab. action: list (optional environment filter) | get (var_id; reveal=true bypasses the mask and returns the real value, additionally audited as action="reveal") | create (environment, name, value, source, description, is_secret) | update (var_id + fields — pass value="" to clear a stored value) | delete (var_id, confirm=true).

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

Input Schema

NameRequiredDescriptionDefault
envNoConfig branch: which `environment` rows of the AI config DB to read/write. staging = the editable working set (default); prod = what production serves.staging
nameNoVariable name, e.g. FEATURE_X.
valueNoVariable value ('' on update clears it).
actionYesOperation to run: list | get | create | update | delete. The tool description lists what each action needs.
revealNoReturn the real (unmasked) value — audited.
sourceNoWhere the value comes from (default db).
var_idNoagent_env_vars UUID.
confirmNofalse (default) = dry run, nothing changes; true = execute.
is_secretNoMask the value in output and audit.
descriptionNoFree-text description.
environmentNoDEPRECATED alias of row_environment.
row_environmentNoThe row's own `environment` column (staging|prod). '' = default to `env` (create) or leave unchanged (update).

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.1/5.0
Behavior4/5

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

With no annotations, the description carries the full behavioral burden and does disclose key traits: secret rows are masked in list/get and audit payloads, reveal bypasses masking and is itself audited, confirm=true is needed for delete, and row_environment defaults to env. It does not cover authentication or permission requirements, 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?

The description is dense but front-loaded with the resource and its role, then action semantics. It is long for a single paragraph, but most details earn their place given 12 parameters and five actions.

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 complex CRUD tool with no annotations, it explains action-specific fields, masking, audit behavior, aliases, and defaults. With an output schema present, return values need not be explained, and the remaining gap is mainly missing auth/permission context.

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 already 100%, so the baseline is 3, but the description adds meaningful semantics: env selects the branch DB, row_environment defaults to env, environment is a deprecated alias, reveal bypasses masking, and value="" clears a stored value. It also maps required fields to each action.

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 resource and operation set: "CRUD for agent_env_vars" with all five actions enumerated. It also explains the tool's role as a third env-var lookup location resolved by core.env_resolver, so the agent can understand what it operates on 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 Guidelines3/5

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

The action list gives implied usage for each operation, but there is no explicit when-to-use guidance versus alternatives, no prerequisites, and no exclusion criteria. The agent can infer what each action does, but not when this tool should be chosen over another approach.

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