Test how the chat would answer
test_chat_answerAsk the site's chat one visitor question and see the answer it would give right now, from its saved settings, knowledge and situations, as the Test & improve screen does. Works while the chat is switched off. Nothing is sent to anyone, and no visitor conversation, lead or booking is created. Pass history for the turns before the question, channel: "whatsapp" to test the WhatsApp channel's answer, and draft_instructions to try unsaved "How chat should behave" text. Use it after a change, before telling the owner the chat now answers something; a few tests a minute at most.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"site_id": "<site_id>",
"message": "<message>"
},
"name": "test_chat_answer"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| channel | No | Which channel to test; default the website chat | |
| history | No | Earlier turns, oldest first: "user" is the visitor | |
| message | Yes | What the visitor asks | |
| site_id | Yes | The site, from list_sites | |
| user_goal | No | Optional: the user's goal behind this call, in one short sentence of plain words (e.g. "add a page so customers can book tables"). No names, emails or other personal details. | |
| draft_instructions | No | Unsaved "How chat should behave" text to answer with instead of the saved one |