Search WhatsApp messages
search-messagesFind WhatsApp messages containing specified words across all chats or a single chat, with date, sender, and reaction filters.
Instructions
[WhatsApp] Find WhatsApp messages containing given words, newest first, across every chat unless a jid narrows it to one. Matching is case-insensitive and every word must appear in the same message. Covers the history imported when the account was paired as well as everything since. Reaction messages are not searched unless includeReactions is set, which also makes a bare emoji findable. A match 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. @-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 is matched on its new text and comes back with editOf, the id of the message it replaces — which may be a separate hit here still carrying its old wording, so prefer the edit when the two disagree. A hit's type names the record as WhatsApp stored it, so an edit reads as protocolMessage and an album item as associatedChildMessage; the text is the real content either way. An edit WhatsApp encrypted for the chat's participants is not searchable at all: its text is unknown to this connector, so a search finding nothing is not proof a message does not exist. Use this instead of paging read-messages when you are looking for something by what it says.
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": {
"query": "<query>"
},
"name": "search-messages"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| jid | No | Restrict to one chat, using a `jid` from list-chats. Omit to search every chat. | |
| limit | No | How many matches to return | |
| query | Yes | Words to look for. All of them must appear in the message. | |
| 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 | |
| fromMe | No | true for only messages you sent, false for only messages you received | |
| includeReactions | No | Search reaction messages too, matching against the emoji itself. Off by default: a reaction carries an id, an author and a timestamp to say one character, and it rarely answers a question about what was said. |