check_operator_replies
Check for new operator replies in a conversation.
Two distinct usage patterns:
1. **Active wait** (default): after ``send_message_to_operator``, call
this with ``wait_seconds=60``. The server holds each call open until
an operator reply arrives or ``wait_seconds`` elapses. On each
return, pass back ``since=<latest_reply_at from previous response>``
so the next call only surfaces *new* messages. Keep looping for up
to ~5 minutes total; if still no reply, tell the tourist the
operator will message back later and stop polling.
2. **Resumption peek**: when the tourist comes back later (new
message in the same session, or a fresh session where they
previously engaged this operator), call once with
``wait_seconds=0`` *before* responding. Omit ``since`` so the
response carries the most recent operator messages — typically the
reply they missed while away.
The response is bounded by ``limit`` (default 50, max 200) and always
sorted chronologically. ``latest_reply_at`` is a cursor for the next
active-wait call. When ``has_replies`` is true, surface the operator's
messages to the user; if they want to respond, call
``send_message_to_operator`` again. When ``operator_active`` is false,
the operator has ended the chat — inform the user and resume normal AI
assistance. Requires OAuth2.
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": {
"operator_id": "<operator_id>"
},
"name": "check_operator_replies"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Maximum number of operator messages to return. Default 50; results are the *most recent* messages, returned in chronological order. Bump higher only if you need deep conversation history. | |
| since | No | Optional ISO timestamp — only return operator messages created strictly after this time. Omit to fetch the most recent operator messages regardless of age (capped by ``limit``). For continuous polling, pass back the ``latest_reply_at`` value from the previous response. | |
| operator_id | Yes | Operator slug to check replies from. | |
| wait_seconds | No | How long the server should long-poll for a new operator reply before returning. The call returns immediately if a reply has already arrived (or the moment one arrives during the wait). Default 60; cap 90 to stay safely under the ~300s client timeout. Set wait_seconds=0 for a non-blocking peek — use this on session resumption to surface any pending reply without holding the request open. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||