Overview
Theget_missing_envs tool identifies every environment variable that is used in code but has no definition anywhere and no default value. These variables will cause runtime crashes when the application tries to access them.
Parameters
Path to the project directory. Defaults to current working directory.
Response
Array of missing environment variables
Total number of missing variables
Number of variables that will definitely cause runtime crashes (critical danger level)
Scan metadata
Example Response
Usage Example
AI assistants can call this tool to identify missing variables before deployment:Use Cases
- Pre-Deployment Check: Ensure all required variables are defined before deploying
- Onboarding: Help new developers set up their environment correctly
- CI/CD: Validate environment configuration in continuous integration
- Crash Prevention: Identify variables that will cause runtime failures
- Environment Migration: Ensure all variables are migrated when moving between environments
Error Prevention
Variables reported by this tool will cause one of these errors at runtime:TypeError: Cannot read property 'X' of undefinedReferenceError: VARIABLE_NAME is not defined- Application crashes when accessing undefined environment variables
- Silent failures if code doesn’t validate environment variables
dangerLevel field indicates severity:
- critical: Used in 3+ locations, will likely crash multiple parts of the application
- high: Used in 1-2 locations, will crash specific functionality