It is possible to retrieve the value of an environment variable with substitute-variable
let [val workspacePath [substitute-variables "${workspace_loc}"]] {
...
set-text $workspacePath
}
It seems that system variables can also be accessed. For example ${system_property:user.home}. See https://www.eclipse.org/forums/index.php/t/1090193/