wechat_fetch_messages
Fetch cleaned WeChat direct, group, and official-account messages by cursor or time window, with resolved names, mentions, reply context, revoked-message filtering, and context buffers.
Instructions
Fetch cleaned WeChat messages across 1-on-1 direct chats, group chats, or official accounts by incremental cursor (after_msg_id) or time window (since). Automatically resolves 4-tier real names (remark > group nick > nick > wxid), @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": "wechat_fetch_messages"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| fresh | No | Force immediate SQLCipher decryption and SQLite snapshot refresh. | |
| 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 WeChat chat_ids (wxid_*, alias, @chatroom, gh_*, filehelper) or ['ALL_ALLOWED'] / ['ALL_DIRECT'] / ['ALL_GROUPS'] / ['ALL_OFFICIAL']. | |
| chat_type | No | Optional session type filter ('all', 'direct', 'group', 'official'). | all |
| fold_noise | No | Fold consecutive short acknowledgment messages ('收到', 'OK', '+1') in markdown mode. | |
| after_msg_id | No | Global monotonic message cursor. 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 chat session (default 500, max 3000). |