list_messages
Retrieve and filter WhatsApp messages from local storage by chat, date range, sender, media type, or text search to find specific conversations and message details.
Instructions
List messages from WhatsApp's local storage with rich filtering. Filter by chat, date range (ISO 8601), sender ('me' vs 'other'), media type, or text search. Returns message ID, stanza ID, text, timestamps, sender info, read status, and media details.
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": "list_messages"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Maximum number of messages to return (default 50, max 500). | |
| order | No | Sort order by message timestamp: 'desc' (newest first) or 'asc' (oldest first). | desc |
| since | No | Filter messages sent on or after this ISO 8601 UTC timestamp (e.g. '2026-11-01T00:00:00Z'). | |
| until | No | Filter messages sent on or before this ISO 8601 UTC timestamp. | |
| offset | No | Number of records to skip for pagination. | |
| search | No | Optional case-insensitive substring search in message text. | |
| sender | No | Filter by sender: 'me' (outgoing), 'other' (incoming), or specific sender JID/phone. | |
| chat_id | No | Filter to a specific chat by JID, phone number, or contact name. | |
| media_type | No | Filter by media type: 'text', 'image', 'video', 'audio', 'document', 'location', 'contact', 'sticker', or 'any_media'. |