optional_env_var
Similar to requiredenvvar but optional. The server will not error on startup if this is missing.
How to use it
optional_env_var is exposed by the Hooks MCP MCP server. Add the server to your MCP client (Claude Desktop, Cursor, Windsurf and others), and the optional_env_var tool becomes available to the model automatically. See the full listing for setup details and every tool this server provides.
Install Hooks MCP
uvx hooks-mcpOther tools in Hooks MCP (3)
Allows any string input from the agent without validation. Use with caution:
This parameter type ensures security by validating that the path parameter is within the project boundaries:
This is a tool parameter expected to exist as an environment variable. The server will fail to start if the environment is missing this var.