Secure Environment File Writer
secure_env_writerWrites environment variables to .env files on remote servers via SSH, with path traversal protection and zero-knowledge output.
Instructions
Writes environment variables to a .env file on the remote server via SSH after path normalization.
Security guarantees:
Path validation using path.resolve normalization to prevent path traversal
Heredoc writing to prevent shell expansion
Zero-knowledge output (never returns or echoes secret values back)
Blocks write attempts to system paths (/etc, /root, etc.)
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"file_path": "<file_path>",
"env_vars": "<env_vars>"
},
"name": "secure_env_writer"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| env_vars | Yes | Key-value pairs of environment variables to write | |
| file_path | Yes | Absolute path on remote server for .env file (e.g. '/var/www/myapp/.env') |