Skip to main content
Glama

check_env_for_secrets

Read-only

Scans a local env file (default: .env) for exposed API keys, tokens, private keys, and passwords, returning only a sanitized report with line numbers, secret types, and variable names.

Instructions

Check a local env file (default: .env) for exposed secrets such as API keys, tokens, private keys and passwords. Returns only a sanitized report (line numbers, secret types, variable names). Secret values are NEVER returned, so it is safe to call. Do not try to read the env file directly.

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

Input Schema

NameRequiredDescriptionDefault
pathNoEnv file path relative to the project root. Defaults to ".env".

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.3/5.0
Behavior5/5

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

Beyond the annotations (readOnlyHint=true, openWorldHint=false), the description discloses the exact return payload (line numbers, secret types, variable names) and a guarantee annotations cannot express: secret values are NEVER returned. That privacy contract plus the "safe to call" reassurance is precisely the behavioral context an agent needs before invoking a secrets tool.

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?

Three short sentences, front-loaded with purpose, then the output guarantee, then the routing instruction. Every sentence contributes a distinct piece of information with no repetition of structured fields.

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

Completeness5/5

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

There is no output schema, so the description must describe return values — and it does, enumerating the sanitized report's fields. Combined with the default path and the safety guarantee, nothing material is missing for a one-parameter read-only tool.

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 100% and the single path parameter is already documented as relative to the project root with a ".env" default. The description only restates the default, adding no format or edge-case guidance, so the schema carries the load and the baseline 3 applies.

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?

The description names a specific verb and resource ("check a local env file") plus the target class of findings (API keys, tokens, private keys, passwords) and the default scope (".env"). It implicitly separates itself from a project-wide scan by saying "local env file," but it never names the sibling scan_project_for_secrets, so an agent must infer the boundary.

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?

It gives an explicit negative instruction — "Do not try to read the env file directly" — which steers the agent to this tool instead of a raw file read, and states the default path when none is supplied. It does not state when the project-wide sibling should be preferred, so the alternative routing is only partial.

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

Deploy Server

Other Tools