Wait for new WhatsApp messages
wait_for_messagesWaits for incoming WhatsApp messages up to a timeout and returns them with a cursor so agents can continue without missing messages between calls.
Instructions
Wait for messages from other people, up to timeout_seconds, and return them with a cursor: pass it to the next call so nothing that lands between calls is missed. addressed_to_me wakes only for direct messages, mentions and replies to the user. For agents that stay on the line.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "wait_for_messages"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cursor | No | From the previous call | |
| chat_id | No | Chat id, or a phone number | |
| account_id | No | ||
| addressed_to_me | No | ||
| timeout_seconds | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| count | Yes | ||
| cursor | Yes | Pass to the next call | |
| messages | Yes | ||
| timed_out | Yes | ||
| account_id | Yes | ||
| cursor_reset | Yes | The cursor was from another run; the wait started now |