A tool works with three kinds of values: parameters, variables, and context values. Every step can use them, and they are how data moves from one step to the next.
Parameters
Parameters are the input the tool receives when it runs, defined under Settings in the Input parameters section. Any step can use them. A step can also store its output in a parameter, which overwrites the value it came in with.
Variables
Variables are created while the tool runs. A step that produces a result stores it in the variable you pick under Select output variable; create a new one with Add. From that step on, the variable is available everywhere later in the flow. Storing another output in the same variable overwrites it.
A variable name contains letters and numbers, does not start with a number or underscore, and is unique within the tool.
Most tools only need the default result variable: every step writes to it, each step reads the previous one's output from it, and the last value is what the tool returns.
Context values
Context values belong to the conversation, not the tool. Inside a tool they are read-only: any step can use them, no step can overwrite them. To set one, use the Contexts section of Return result. Knowledge searches also use context to pick matching sources; see Search knowledge and Context Variables.
Using them in a step
Any text field in a step can hold these values. Type / to insert one, or pick it from the list. The value is filled in when the tool runs. During a test run, you can watch the values change per step in the debugger under Collected data; see Testing your tool.