wait_for_call_event
Long-poll for the next event on a call placed under control:"mcp" (place_call). Blocks up to timeout_seconds (1-25, default 20) waiting for a new event. A TIMEOUT IS A NORMAL RESULT, NOT AN ERROR: the response comes back 200 with timed_out:true and an empty events list — call this tool again immediately, passing after_seq=<the previous response's next_seq>, to keep waiting; this is the intended loop, not a failure to retry around. Events with response_required:true (call.answered, digits.received, actions.completed) must be answered with respond_to_call_event before the call can proceed. Terminal events (call.completed, call.failed, call.no_answer, call.busy) end the call and the loop.
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": {
"call_id": "<call_id>"
},
"name": "wait_for_call_event"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| call_id | Yes | the call UUID returned by place_call's control:"mcp" response (the same call's HD_ session id also works) | |
| purpose | No | Required on tools that read data or reports; recommended on every tool. One sentence: what you are doing and why (for example "finding this caller's open ticket to answer them"). Building a report, dashboard, analytics or an export is a SautiDesk Pro feature done by the report tools, not by pulling records. | |
| after_seq | No | cursor: only return events after this sequence number; echo back the previous call's next_seq to resume waiting (default 0 — from the start of the call) | |
| timeout_seconds | No | long-poll hold time in seconds, 1-25 (default 20, clamped server-side); a timeout is a NORMAL result, not an error — call again with next_seq to keep waiting |