Tool Chaining
A tool can decide which tool runs next. The next tool runs immediately, without the orchestrator deciding again, and can read the earlier results from the conversation history.
There are two ways to chain:
- In the editor - a tool always runs one fixed next tool and passes its result on.
- From a script - a custom script tool decides at runtime whether to chain, which tool to run and with which arguments.
If a script chains and its tool also has a configured next tool, the script's choice wins. A tool has at most one next tool, and only a tool that succeeded triggers it.
Chaining in the editor
- On the Tools tab, open a custom tool, Forward Call or Web Search.
- Under Advanced settings, pick a tool in Force next tool.
- Save. The tool's card shows an arrow badge with the next tool.
Choose None – the AI decides to remove it. A next tool that is later switched off or deactivated is marked (unavailable) and is not run.
The next tool receives the result of the tool before it in its only required parameter, or, if it has none, in its only optional parameter. If the result cannot fill a required parameter, the next tool is skipped and the orchestrator continues as usual.
| Calling tool | Passed on |
|---|---|
| Script tool | The script's return value |
| HTTP tool | The response body |
| Knowledge Search tool | The content of the found passages |
| Forward Call | The dial status, for example BUSY or ANSWER |
| Web Search | Nothing |
Chaining from a script
A script tool schedules the next tool with tracker_api.force_next_tool(). For Forward Call and Forward to Live Chat there are shortcuts:
tracker_api.force_next_tool("tool_check_availability", {"event_type": "consultation"})
tracker_api.force_forward_call("+4930123456")
tracker_api.force_forward_livechat("support")
Custom tools are addressed as tool_ followed by the tool name; their arguments are the extraction field names. Arguments are validated exactly like those chosen by the AI.
Forward Call
A next tool configured on Forward Call runs once the forwarded call has ended, and receives the dial status. This lets you, for example, try another number when the line is busy.
A number passed to Forward Call through chaining is dialed directly, even if it is not a configured forwarding target. If Forward Call has no targets at all, the orchestrator is not offered it and it only runs through tool chaining; the card shows this with an eye-slash icon.
When something goes wrong
If a chained step cannot run, for example because of invalid arguments, its error is added to the conversation history and the orchestrator decides what to do next. Chaining never ends the conversation.
Related Documentation
- Agent Mode - tools, default tools and custom tools
- How Agent Mode Works - the orchestrator's decision loop
- Scripts - writing and editing scripts