whatsapp_fetch_messages
Fetch cleaned WhatsApp group messages by cursor or time window, resolving names, mentions, and reply chains while filtering revoked messages and adding context buffer.
Instructions
Fetch cleaned WhatsApp group messages by incremental cursor (after_msg_id) or time window (since). Automatically resolves real names, @mentions, 150-char reply chains, filters out revoked messages, and prepends context buffer messages.
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_ids": "<chat_ids>"
},
"name": "whatsapp_fetch_messages"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| fresh | No | ||
| since | No | Relative duration (e.g. '12h', '24h', '7d') or ISO-8601 timestamp when after_msg_id is not set. | 24h |
| until | No | Optional upper bound ISO-8601 timestamp. | |
| format | No | markdown | |
| chat_ids | Yes | Array of group chat_ids (@g.us) or ['ALL_ALLOWED']. | |
| fold_noise | No | Fold consecutive short acknowledgment messages ('收到', 'OK', '+1') in markdown mode. | |
| after_msg_id | No | Global monotonic message cursor (Z_PK). Fetches only messages with msg_id > after_msg_id. | |
| context_buffer | No | Number of preceding history messages to include as context buffer (default 10). | |
| limit_per_chat | No | Max messages per group chat (default 500, max 3000). |