Website Tools

Troubleshooting

Why a website tool is not called, and what the console says about your host token.

Turn on diagnostics while you set up: ChatWidget.debug(true). The widget then explains in the console what Sarufi decided about your token and which handlers are not offered. It never prints the token, tool args or results.

Tools are never called

SymptomLikely causeFix
Nothing happens while testing in the dashboardThe playground does not run website toolsTest on your own site
ChatWidget is not definedYour code runs before the widget script has loadedRun it after the embed snippet, inside a load handler
Console: a handler "is not offered in this session"Its tool set is not linked to this bot, or it needs a signed-in user and no token was acceptedLink the tool set on the bot's Website tools, or fix the token
A linked tool is never calledsetTools([]), or a list without it, is still in effectCall setTools(null), or include the name
Same, on some pages onlyThe tool's available() returns false thereCheck its condition
/chat-token answers 401The visitor is signed outExpected: the chat continues with public tools only
Connecting a tool set is refusedIt would take the bot past 8 linked tool sets or 24 tools, or a tool name clashesDisconnect a set you no longer need, merge small sets, or rename the clashing tool
Saving a tool set is refusedIt has more than 24 toolsSplit it into two tool sets

For what each host_token_status means, see Signed-in users. For digest problems with page-declared tools, see Tools declared in page code.

On this page