Skip to main content
Glama
irrenwill

secret-safe-env

by irrenwill

Check if a key exists in .env

env_key_exists
Read-only

Check whether an environment variable name exists in a project .env file. Returns true or false to verify set_env_secret without exposing the value.

Instructions

Check whether an environment variable NAME already exists in a project .env file. Returns ONLY true/false - never the value. Use this to verify set_env_secret worked, INSTEAD of reading/cat-ing .env (which would expose the secret).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
keyYesThe env var NAME to check, e.g. OPENAI_API_KEY.
env_pathNoAbsolute path to the project .env (same as set_env_secret). Defaults to <CLAUDE_PROJECT_DIR or cwd>/.env.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
existsYes
Behavior4/5

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

Annotations declare readOnlyHint=true and destructiveHint=false, confirming this is a safe read operation. The description adds that it returns only true/false and never the value, which is important behavioral detail beyond the annotations. No contradiction.

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?

The description is extremely concise: two sentences that front-load the core purpose and include key behavioral and usage notes. Every sentence earns its place, with zero wasted words.

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?

With 2 parameters fully described in the schema, a known output schema, comprehensive annotations, and a sibling tool mentioned, the description provides all necessary context. The agent has clear guidance on when and how to use the tool effectively.

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?

Schema coverage is 100%, so the schema already defines the parameters. The description adds value by explaining the default for env_path and relating it to set_env_secret. This context helps the agent use the parameters correctly without repeating schema details.

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 checks if an environment variable NAME exists in a .env file and returns only true/false. It distinguishes itself from reading the file directly and mentions the sibling tool set_env_secret, making the purpose unambiguous.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

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

The description explicitly states when to use this tool—to verify set_env_secret worked—and what to avoid (reading/cat-ing .env). It provides a clear alternative (don't expose secrets), which helps the agent choose correctly.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/irrenwill/secret-safe-env'

If you have feedback or need assistance with the MCP directory API, please join our Discord server