Check if a key exists in .env
env_key_existsCheck 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
| Name | Required | Description | Default |
|---|---|---|---|
| key | Yes | The env var NAME to check, e.g. OPENAI_API_KEY. | |
| env_path | No | Absolute path to the project .env (same as set_env_secret). Defaults to <CLAUDE_PROJECT_DIR or cwd>/.env. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| exists | Yes |