Skip to main content
Glama

List environments

list_environments
Read-onlyIdempotent

Lists workspace environments, variable names including inherited ones, the active environment, and session-provided variable names without exposing values.

Instructions

List the environments of the workspace with the names of their variables (inherited ones included; extends names the parent, and problem says why its chain cannot be used), which one is active, and the names of the variables that have a value in this session. Values are never returned; reference a variable as {{name}}. Names under secret get their values from the developer; when one is missing from sessionVariables, ask the developer to pass it with --var-from-env.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "list_environments"
  }
}

Input Schema

NameRequiredDescriptionDefault

No arguments

Output Schema

NameRequiredDescriptionDefault
activeNo
environmentsNo
sessionVariablesNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.7.19

TDQS

A4.3/5.0
Behavior5/5

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

Annotations already cover safety (readOnlyHint=true, destructiveHint=false, idempotentHint=true), and the description still adds real behavioral context beyond them: values are withheld entirely, secret values are developer-supplied, and a broken inheritance chain surfaces as a `problem` field. The `{{name}}` reference syntax and the resolution path via `--var-from-env` are operational details no annotation or schema conveys.

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 densely loaded sentences, front-loaded with the resource and immediately followed by the enumeration of return contents. Slight cost in the parenthetical nesting ("inherited ones included; extends names the parent, and problem says why its chain cannot be used"), which packs a lot into one clause but stays parseable.

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 zero-parameter read tool this covers the important behaviors: masking of values, inherited-variable semantics, failure signaling, and the secret-resolution workflow. With an output schema present it needn't describe the literal return shape, so the remaining gap is only routing guidance versus siblings such as set_environment or scan_secrets.

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?

The tool takes zero parameters, so the baseline is a 4 and there is nothing for the description to clarify. It instead documents return-side semantics (inherited variables, `extends`, `problem`, session variables), which the schema cannot supply even though an output schema exists; this overlaps some of what the output schema likely encodes.

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 verb and resource ("List the environments of the workspace") and enumerates exactly what is returned: variable names per environment, inherited variables with the parent named in `extends`, the active environment, and session-valued variable names. The explicit "Values are never returned" clause distinguishes it from any tool that would expose values.

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?

Usage is implied rather than stated: an agent can infer this is the read-only discovery step before set_environment/set_variables, but no sibling is named and no when-not condition appears. The one actionable instruction ("when one is missing from sessionVariables, ask the developer to pass it with --var-from-env") is a remediation rule for a missing secret, not guidance on choosing this tool over another.

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