Passing variables for use in the runtime tool environment is a common occurrence, in particular "@tool" .
See the full invoke_app documentation.
The variable "@tool" can be passed into your tool via the invoke script. This is important information for you tool to know so that the tool can access example input files and static data files that reside in the respective directories. There are two way to pass the "@tool" location via the invoke script to the tool.
1) As an argument to the tool
2) As an environment variable