Skip to main content
Glama

audit_env_compose_code_drift

Read-onlyIdempotent

Detect configuration drift across .env, .env.example, docker-compose.yml, and source code environment references, then return redacted findings with a 0–100 deployment safety score.

Instructions

Computes deterministic 4-way configuration cross-drift across .env, .env.example, docker-compose.yml, and polyglot source code references (process.env, import.meta.env, os.environ), returning redacted findings and a 0-100 deployment safety score.

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": "audit_env_compose_code_drift"
  }
}

Input Schema

NameRequiredDescriptionDefault
envTextNoOptional raw .env content string.
codeTextNoOptional source code text to extract environment variable references from.
codePathsNoOptional array of source files or directories to scan for environment variable references.
targetEnvNoTarget deployment environment profile (defaults to production).
composeTextNoOptional raw docker-compose.yml / compose.yaml content string.
envFilePathNoOptional explicit path to .env file.
workspaceDirNoOptional project root directory to auto-discover .env, .env.example, docker-compose.yml, and source files.
envExamplePathNoOptional explicit path to .env.example file.
envExampleTextNoOptional raw .env.example content string.
composeFilePathNoOptional explicit path to docker-compose.yml / compose.yaml.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

B3.4/5.0
Behavior3/5

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

Annotations already declare readOnly, idempotent, non-destructive, and closed-world, so the safety profile is covered. The description adds genuinely useful behavior beyond that: results are deterministic, findings are redacted (important — the agent knows secrets are masked), and a 0-100 score is produced. It says nothing about how large a scan is tolerated, what happens when files are missing, or how conflicting inputs are resolved.

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?

A single tight sentence with no filler, front-loading the operation and enumerating the four inputs compactly. It is information-dense rather than padded, though the one-sentence form leaves no structural room for usage or input-mode guidance.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The description compensates for the absent output schema by naming both return components (redacted findings, 0-100 score), and redaction is a meaningful disclosure. However, for a 10-parameter tool with zero required parameters, an agent still needs guidance on which input combination to supply and whether explicit file paths override workspaceDir discovery; that is missing.

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 100% across all 10 parameters, so the schema already documents each one; baseline 3 applies. The description adds framing about what source-code scanning targets (process.env, import.meta.env, os.environ), but it does not clarify the crucial interaction between input modes — text vs. explicit path vs. workspaceDir auto-discovery — which is the main ambiguity an agent faces here.

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?

States a specific verb (computes) and a precisely scoped resource: cross-drift across four named artifact types (.env, .env.example, docker-compose.yml, source references) with concrete examples of the reference syntaxes detected. It also names the output (redacted findings + 0-100 score). It does not explicitly contrast itself with sibling tools such as compare_env_runtime_parsers, which is what separates a 4 from 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 Guidelines3/5

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

Usage is only implied: the phrase 'deployment safety score' and 'targetEnv' semantics suggest a pre-deploy/CI check, and the four-way scope suggests full-project auditing. There is no explicit 'use this when' or 'use X instead when' statement, and no exclusions relative to compare_env_runtime_parsers or detect_client_bundle_secret_leaks.

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