Skip to main content
Glama

detect_client_bundle_secret_leaks

Read-onlyIdempotent

Audits .env files and frontend configs for private keys, service_role JWTs, API secrets, and database URIs exposed through public env prefixes, then redacts secret values.

Instructions

Audits .env files and frontend source configs for private keys, Supabase service_role JWTs, API secrets, or database URIs accidentally prefixed with NEXT_PUBLIC_, VITE_, NUXT_PUBLIC_, REACT_APP_, EXPO_PUBLIC_, or PUBLIC_, redacting all secret values.

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

Input Schema

NameRequiredDescriptionDefault
envTextNoOptional raw .env text to inspect for client-bundle secret exposure.
codeTextNoOptional source code snippet containing process.env or import.meta.env references.
codePathsNoOptional local source files or directories to scan for public environment variable references.
envFilePathNoOptional local path to a .env or .env.production file on disk.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A3.8/5.0
Behavior4/5

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

Annotations already cover read-only, non-destructive, idempotent, closed-world behavior, so the bar is lower. The description nevertheless adds a genuine behavioral trait beyond them: all secret values are redacted in the result, which tells the agent findings are safe to surface and that the tool does not emit raw credentials.

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 front-loaded sentence led by the verb, with no filler clauses. The long prefix list (NEXT_PUBLIC_, VITE_, NUXT_PUBLIC_, REACT_APP_, EXPO_PUBLIC_, PUBLIC_) is dense but each entry carries detection value rather than repeating structure.

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?

For a read-only audit tool with no output schema, the description covers what is detected and that values are redacted, but omits the shape of the result (per-file findings, severity, counts) and the behavior of the all-optional parameter set. An agent knows what the tool does but not what it gets back.

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 percent and all four parameters are individually documented as optional raw text, code snippets, code paths, or an env file path. The description adds no meaning beyond that - notably it never says whether these inputs can be combined in one call, which of them takes precedence, or what happens with zero arguments.

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?

"Audits .env files and frontend source configs" gives a specific verb and resource, then narrows it to concrete secret classes (private keys, service_role JWTs, API secrets, database URIs) and the public prefixes that make them leak. That is specific enough to separate it from audit_env_compose_code_drift, compare_env_runtime_parsers, and generate_sanitized_env_example.

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 context of use is implied by the exposure scenario (secrets accidentally prefixed with NEXT_PUBLIC_/VITE_/etc.), so an agent can infer when the tool applies. However, no sibling is named, no when-not condition is given, and nothing says whether this is a pre-commit check versus a one-off audit.

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