request_sync
Backfill historical WhatsApp chat messages into the local cache so they can be queried later, extending older history or filling recent gaps without affecting the chat or other users.
Instructions
Ask WhatsApp servers to backfill historical messages for a chat into the local cache; messages arrive asynchronously and become queryable via list_messages once delivered. No effect on the chat itself or other users. The request is always anchored on a real cached message, because WhatsApp resolves the cursor by message key. Use anchor: "oldest" to extend history backwards, calling repeatedly to walk back count messages at a time; anchor: "newest" (the default) only fills gaps below the most recent message. Returns a plain-text confirmation describing what was requested. An empty result afterwards means the server served nothing for that cursor, typically because the history predates WhatsApp's retention for linked devices.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| count | No | how many messages to request before the anchor (default 50) | |
| anchor | No | which cached message to anchor on: `oldest` to extend history backwards, `newest` to fill recent gaps (default) | |
| use_lid | No | resolve the chat to its LID form (default true). Messages predating WhatsApp's LID migration are keyed on the phone-number JID; set false when walking back past that boundary returns empty batches | |
| chat_jid | Yes | WhatsApp JID: individual as `<digits>@s.whatsapp.net` or bare phone digits, group as `<digits>-<timestamp>@g.us` | |
| from_timestamp | No | ISO-8601 UTC timestamp; anchors on the newest cached message at or before this time, falling back to the oldest cached message when nothing is cached that far back. Ignored when `anchor` is set |