Tool Invocation
In the XpertAI workflow system, the Tool Node invokes external capabilities and services, supporting data processing, system integration, and MCP tool invocation. It seamlessly integrates complex logic and third-party system capabilities into automated workflows.
Tool Types Overviewโ
Tool nodes support three access methods:
- Built-in Tools: Provided by XpertAI, ready to use, some require authorization before first use.
- Custom Tools: Users can import via standard interfaces (e.g., OpenAPI/Swagger/OData) or manually configure for enterprise systems or proprietary services.
- MCP Tools: Highly customizable for complex business logic or asynchronous tasks, using existing modules or custom development.
โ All tools can be created and managed in the โXpertAI โ Workspace โ Toolsโ menu.
Tool Node Parameter Configurationโ
Configure tool selection and parameters in the Properties Panel:
Add Tool Node
Insert a โToolโ node in the workflow canvas.Select Tool Set and Tool
In the properties panel, choose:- Tool Set (created tool set)
- Tool (specific tool within the set)
Configure Input Parameter Variables
Tools require input parameters (e.g., user ID, keywords, time range). Use workflow state variables, such as:User input โ ${human.input}
Current time โ ${sys.datetime}
Previous node output โ ${<node_name>.result}- Check parameter format via โCopy Parameter Example.โ
- Use
{{variable}}
syntax for references.
Output Handling (Optional)
Tool results are available as variables for downstream nodes (e.g.,${<tool_name>.text}
). Map specific fields as needed.
Advanced Feature: Error Handlingโ
To ensure workflow stability, tool nodes support error handling configuration:
- Enable the โError Handlingโ toggle to create an exception branch (Catch).
- Add fallback nodes in the exception branch, such as:
- Send error alerts
- Return default data
- Log and terminate the workflow
This prevents workflow interruptions due to third-party service failures.
Application Examplesโ
- Use custom tools to fetch order info from ERP systems.
- Use MCP tools to sync data to a data platform.
Tipsโ
- Ensure tools are created and tested before use.
- Use workflow variables for input parameters to enhance generality and reusability.
- Enable error handling for critical calls to ensure workflow robustness.