Skip to main content
Use a tool node to call a tool in your agentic workflow. To configure a tool node, use the tool() method in your agentic workflow. In this method, define the following parameters:
Any or string
required
The tool used in the agentic workflow. Configure it as a string such as "myTool" or as a Python function such as myTool.
Note:
Only functions that use the @tool decorator qualify for the Python function option.
string
The name of the tool.
string
The display name of the tool.
string
The description of the tool.
type[BaseModel]
Input schema for the tool.
type[BaseModel]
Output schema for the tool.
DataMap
Define input mappings using a structured collection of Assignment objects.
NodeErrorHandlerConfi
Defines the configuration for the retry option using a JSON structure. In this JSON, set the following fields:
  • error_message: an optional string that describes the retry error.
  • max_retries: an optional integer that limits how many times the node retries.
  • retry_interval: an optional integer that sets the interval between retries in milliseconds.

Tool callbacks

Tool nodes support four tool types: OpenAPI, Python, Flow, and MCP. The Flow runtime executes these callbacks using a fire-and-forget pattern for optimal performance.
RecommendationFor Flow callbacks, use OpenAPI tools as the preferred callback mechanism. OpenAPI tools provide a clean, stateless callback interface without the complexity of managing user interactions or correlation ID propagation.
Limitation: Flow Tools as CallbacksWhen using a Flow as a callback tool within another Flow, there is a current limitation:
  • Restriction: Flow callback tools must not contain user activity nodes (nodes that require user interaction or input).
  • Reason: If a Flow callback contains user activity nodes, the Flow runtime would need to submit user activity events to the user’s chat thread. This requires propagating correlation IDs through the Flow callback event chain, which adds significant complexity to the implementation.
  • Workaround: To keep the implementation simple and maintainable, Flows used as callback tools should be designed without user interaction requirements.

Example

The following example shows how to configure a tool node in an agentic workflow:
Python