Wait for new messages and events
wait_for_eventsThe way to check for new messages. Waits until something new happens on your connected accounts, then returns it: new messages, read receipts, reactions, edits and deletes, comments on your posts, LinkedIn invitations received and accepted, new followers, account status changes, and an account starting to rest. It returns at once when there are events, and otherwise waits up to wait_seconds (default 30, at most 50) for the first one. It reads Spaces' own event stream and never touches the platform, so it is safe to call again and again. Call it in a loop instead of calling list_messaging_chats or list_messaging_messages to look for news: repeated platform checks look like a bot and can get an account restricted. Pass the next_cursor of the last answer as after to continue exactly from there; without after it continues from where this key got to last time (the first time, the last 24 hours). after: now skips the backlog. Filter with types (a list) and account_id. billing.card_required means the workspace needs a card before sending can continue: tell the person, and give them add_card_url. review.invite means they may want to leave a short review: ask first, then submit_review only after they agree. message.received carries the text (up to 1,000 characters, text_truncated when cut), the sender and chat_id: answer with reply_in_chat, and skip is_sender: true, which is the account's own message. Read a chat with list_messaging_messages only when you need more context. Events are kept 14 days.
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_events"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| after | No | ||
| limit | No | ||
| types | No | ||
| account_id | No | ||
| wait_seconds | No |