List chats
list_chatsRetrieve and browse WhatsApp chats from a local archive, sorted by recent activity or name, with filters and cursor-based pagination.
Instructions
List WhatsApp chats (people and groups), most recently active first or by name, optionally filtered by a name, JID or contact. Paginated by cursor.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "list_chats"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | page size (default 20, max 200) | |
| query | No | filter by chat name, JID, or contact name/number | |
| cursor | No | next_cursor from the previous page | |
| sort_by | No | last_active (default) or name | |
| include_last_message | No | include the latest message of each chat (default true) |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| chats | Yes | ||
| has_more | Yes | ||
| next_cursor | No |