list_messages
Search and browse cached WhatsApp messages by chat, sender, date range, or text. Page through results with optional surrounding context.
Instructions
(reads local cache; works while disconnected) Search and page through cached WhatsApp messages, optionally filtering by chat, sender, time range, and substring; can include surrounding context messages. Read-only; no side effects. Use get_message_context to expand around a single known message ID, or request_sync to backfill missing history. Returns a human-readable formatted text block listing matching messages.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| after | No | ISO-8601 UTC lower bound on message timestamp (inclusive) | |
| before | No | ISO-8601 UTC upper bound on message timestamp (inclusive) | |
| chat_jid | No | filter to messages in this chat (WhatsApp JID: individual as `<digits>@s.whatsapp.net` or bare phone digits, group as `<digits>-<timestamp>@g.us`) | |
| context_after | No | messages to include after each match (default 1, capped at 20 server-side) | |
| context_before | No | messages to include before each match (default 1, capped at 20 server-side) | |
| include_context | No | if true, attach a few surrounding messages to each match (defaults to true) | |
| limit | No | max messages to return (default 20, capped at 100 server-side) | |
| page | No | zero-based page index for paging through results (default 0) | |
| query | No | case-insensitive substring to match within message body | |
| sender_phone_number | No | filter to messages sent by this phone or JID (WhatsApp JID: individual as `<digits>@s.whatsapp.net` or bare phone digits, group as `<digits>-<timestamp>@g.us`) |