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
| Name | Required | Description | Default |
|---|---|---|---|
| env | No | Config branch: which `environment` rows of the AI config DB to read/write. staging = the editable working set (default); prod = what production serves. | staging |
| name | No | Variable name, e.g. FEATURE_X. | |
| value | No | Variable value ('' on update clears it). | |
| action | Yes | Operation to run: list | get | create | update | delete. The tool description lists what each action needs. | |
| reveal | No | Return the real (unmasked) value — audited. | |
| source | No | Where the value comes from (default db). | |
| var_id | No | agent_env_vars UUID. | |
| confirm | No | false (default) = dry run, nothing changes; true = execute. | |
| is_secret | No | Mask the value in output and audit. | |
| description | No | Free-text description. | |
| environment | No | DEPRECATED alias of row_environment. | |
| row_environment | No | The row's own `environment` column (staging|prod). '' = default to `env` (create) or leave unchanged (update). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |