Read messages from a WhatsApp chat
read_messagesRetrieves messages from a single WhatsApp chat, oldest to newest, with options for latest, older via before, date windows, or status stories.
Instructions
Read one chat, oldest to newest: the latest messages, older ones with before (wazap asks the phone when the local history runs out), or a window with since/until. Long texts are cut unless full_text. chat_id "status": the stories of the last hours (a day at most), shown nowhere else.
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": {
"chat_id": "<chat_id>"
},
"name": "read_messages"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| hours | No | The last N hours; "status": 24 by default | |
| limit | No | ||
| since | No | ISO date or time | |
| types | No | Only these types; limit counts them | |
| until | No | ISO date or time | |
| before | No | The oldest message_id you have | |
| chat_id | Yes | Chat id, number or name (one chat only); "status": stories | |
| full_text | No | Each message's text whole; a list cuts long ones otherwise | |
| account_id | No | ||
| include_previews | No | Attach a small image of each photo, up to 6 |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sync | Yes | ||
| count | Yes | ||
| hours | No | ||
| notes | No | Caveats to act on or tell the user | |
| older | No | before ran past the local history: the phone was asked, and sent this many | |
| since | No | The window asked for, as read | |
| types | No | ||
| until | No | ||
| chat_id | Yes | ||
| omitted | No | Older stories left out by limit | |
| messages | Yes | ||
| previews | No | The message_id of each attached image, in their order | |
| resolved | No | chat_id was a name: the chat it resolved to | |
| account_id | Yes | ||
| preview_count | Yes | ||
| more_in_window | No | The window holds older messages than these: page on with before | |
| unconfirmed_sends | No | Sends WhatsApp has not echoed yet: outcome unknown, not failed |