list_chats
Retrieve cached WhatsApp chats (1:1 and groups) filtered by name substring and sorted by recency or alphabetically. Optionally includes each chat's most recent message.
Instructions
(reads local cache; works while disconnected) List cached WhatsApp chats (1:1 and group), optionally filtered by name substring and sorted by recency or alphabetic name. Read-only; no side effects. Use get_chat for a single chat by JID, list_groups for groups only. Returns a JSON array of chat objects (each with JID, name, last-message metadata when requested).
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 |
|---|---|---|---|
| page | No | zero-based page index for paging through results (default 0) | |
| limit | No | max chats to return (default 20) | |
| query | No | case-insensitive substring to match against chat name | |
| sort_by | No | sort order: `last_active` (most-recent first, default) or `name` (alphabetic) | last_active |
| include_last_message | No | if true, include each chat's most recent message in the result (defaults to true) |