Skip to main content
Glama

Inspect environment variables

inspect_environment
Read-onlyIdempotent

List environment variables from .env and Compose files, classifying each as configuration or secret while never revealing secret values—only key names.

Instructions

List the environment variables the project uses, from .env files and from Compose, and classify each as configuration or secret. Secret VALUES are never returned -- only the key names -- so this is safe to call on a project with real credentials.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
filesNo
warningsNo
variablesNo
config_countNo
project_pathYes
secret_countNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.4/5.0
Behavior5/5

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

The description explicitly states that secret VALUES are never returned, only key names, and that it is safe to call on projects with real credentials. This adds meaningful behavioral context beyond the annotations (readOnlyHint, idempotentHint, destructiveHint) by explaining the safety guarantee in concrete terms.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two sentences with no filler. The core function is stated first, followed by the critical safety guarantee. Every word earns its place.

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?

The tool has an output schema, so return values are documented elsewhere. The description covers the key behavioral guarantee (no secret values returned) and the data sources (.env files, Compose). It doesn't mention edge cases like missing .env files or how classification works, but for a read-only inspection tool with an output schema, this is sufficient.

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 description coverage is 0%, so the description must compensate. It explains what the tool does with the path (inspects .env files and Compose), but doesn't specify path format, whether it accepts file or directory paths, or what happens if the path is invalid. The single parameter is simple enough that the description provides adequate context, but not detailed semantics.

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?

The description clearly states the tool lists environment variables from .env files and Compose, and classifies them as configuration or secret. This is a specific verb-resource combination that distinguishes it from sibling tools like inspect_project or inspect_compose.

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?

The description implies when to use it: when you need to know which environment variables a project uses and their classification. It doesn't explicitly name alternatives or exclusions, but the context of sibling tools like inspect_project and inspect_compose makes the use case clear enough.

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