Parameters, variables, context and data flow
When building workflows in the tool, it’s important to understand the roles of parameters, variables, and context values, as well as how they are used across different steps. These elements form the backbone of data flow and dynamic behavior during tool execution.
Parameters
Parameters are the input values provided to the tool. These are pre-defined, serving as the initial data points that the tool uses to perform its tasks. Parameters can be referenced in various steps to guide logic, populate fields, or define outputs. Additionally, parameters can be selected as Output variables in steps. If selected as Output variables, its value will be overwritten during the execution of the tool.

Variables
Variables are temporary values defined within the tool during its execution. They are created from the Select output variable of each step (except Logical Step and Parallel Execution) by clicking the + Add button and providing a valid variable name. Variable names must adhere to the following rules:
They must consist of alphanumeric characters.
They cannot start with a number or underscore.
They must be unique within the tool.
Once defined, variables are available for use in the current step and all subsequent steps. They act as placeholders for step outputs and can be dynamically updated as the tool progresses. Same as Parameters, if the same variable is selected as the output in multiple steps, its content will be overwritten during execution.

Use a variable in a field

Select a variable or + Add a new one
Variables & Parameters in the Debugger
Variables and Parameters are visible in the Current State tab of the debugger, allowing you to track their values during tool execution. This is especially helpful for debugging and understanding how data flows through the tool. They can be modified from the Current State editor before rerunning the tool.

Variables in the Current State of the Debugger
Context Values
Context values are global constants available at the conversation level. Unlike variables, context values cannot be modified within the tool and remain consistent throughout its execution. They are useful for referencing static data that applies across multiple steps or workflows. However, context values cannot be used as output variables in steps or the Output Step, as they are immutable. These values provide a reliable way to access shared information without the risk of accidental modification.
Note that the Knowledge steps heavily rely on this since the Knowledge search has built-in functionality to filter sources based on the context. More about this in the Knowledge step documentation.

Using Parameters, Variables, and Context Values in Steps
Each step in the tool contains fields where you can inject parameters, variables, or context values to customize behavior. There are various fields across steps configuration where these can be injected, alongside condition fields in the Logical Step.
You can insert these elements by typing free text and using the / command palette or by selecting them from a list. At runtime, the step attributes will dynamically update to reflect the current value of the injected parameter, variable, or context value.
A Simple Use Case: Using the "result" Variable
For a straightforward workflow, the default "result" variable can be used to pass the output of each step to the next. By consistently selecting "result" as the output variable in each step, the final step in the workflow will automatically return the tool's final output. This approach simplifies workflows where the output of each step builds upon the previous one, ensuring a smooth and logical progression. For most tools that you build, changing the output variable of a step is not needed as long as you rely on the default result output.
Conclusion
By understanding the distinctions and use cases for parameters, variables, and context values, you can design workflows that are both flexible and robust. Whether you're passing input data, storing temporary outputs, or referencing global constants, these elements provide the foundation for dynamic and efficient tool execution. The screenshots provided illustrate how these concepts are implemented in the tool builder, making it easier to apply them effectively in your workflows.