Read WhatsApp messages
read-messagesRead a page of messages from a WhatsApp conversation, newest first, using the chat ID; filter by date and page back to fetch older history.
Instructions
[WhatsApp] Read one page of messages from one WhatsApp conversation, newest first. Takes the jid returned by list-chats. Covers the history imported when the account was paired as well as everything since, so older conversations are reachable — use since/until to target a date range. A response is one page, not the whole range: when hasMore is true there are older messages you have not seen, so call again with nextPage and the same jid, limit and window bounds, and keep going until hasMore is false before treating the range as fully read. covered reports the span this page actually covers, which for a truncated range is narrower than the one you asked for, and totalMatching/totalPages say how much the range holds in full — a count of distinct messages, safe to quote. A message you sent is marked fromMe and carries no author; on one you received, author is the sender's name where the account knows it, and absent where it does not. Reaction messages are left out unless includeReactions is set. @-mentions in the text are shown as names where the account knows them, and left as raw numeric ids where it does not — an id is not a name to guess at. An edited message arrives as its own record carrying the new text, with editOf naming the message it replaces; that earlier record is still in the history with the text it had before, so read the pair as one message that changed rather than as two. WhatsApp's own control records — deletions, disappearing-message timer changes, key exchanges — carry nothing to read and are left out, counted by protocolMessagesExcluded when any were, and still included in totalMatching. An edit that WhatsApp encrypted for the chat's participants comes back with no text and unreadable: 'encrypted-edit': the current wording of that message is unknown here, so report it as unknown rather than treating the earlier version as final. To find a message by what it says, prefer search-messages when this connector offers it.
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": {
"jid": "<jid>"
},
"name": "read-messages"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| jid | Yes | Chat identifier from list-chats, e.g. 5511999999999@s.whatsapp.net | |
| page | No | 1-based page of `limit` messages, counting back from the newest. Walk this up while `hasMore` is true. | |
| limit | No | How many messages to return in this page | |
| since | No | Only messages at or after this date, e.g. 2024-03-01 or 2024-03-01T12:00:00Z | |
| until | No | Only messages at or before this date. Pass back the `window.until` from a previous page when paging a range. | |
| includeReactions | No | Include reaction messages. Each reaction is its own record — an id, an author, a timestamp and an emoji — so in an active group they are a large share of a page while rarely mattering for reconstructing the conversation. Off by default for that reason; turn it on when who reacted is the question. |