get_messages
Read recent messages from a specific WhatsApp chat or group (supports pagination via message ID cursor and fromMe filter).
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": {
"chatId": "<chatId>"
},
"name": "get_messages"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | No | Message ID cursor for pagination | |
| count | No | Number of messages to return (default: 20, max: 200) | |
| chatId | Yes | Chat ID to fetch messages from (e.g., '972501234567@c.us', '120363123456789012@g.us', or bare phone number) | |
| fromMe | No | Filter by whether messages were sent by you | |
| threadId | No | Optional reconstructed group thread ID to filter messages to that thread | |
| direction | No | Fetch messages 'before' or 'after' the given message ID (default: 'before') |