wechat_get_chat_history
Retrieves a friend or group chat's messages for a specified date by scanning backward through history, then returns the records in chronological order.
Instructions
获取指定好友或群聊在某一天的聊天记录。
自动向上回溯历史消息直到覆盖目标日期,再按日期过滤,返回按时间正序排列的记录。 目标日期较久远时可调大 max_messages。
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| to_user | Yes | 好友或群聊的备注/昵称,需与微信中显示的名称完全一致 | |
| save_json | No | 是否把结果保存为 JSON 文件 | |
| folder_path | No | 保存目录;留空则使用服务器配置的输出目录 | |
| target_date | Yes | 目标日期。支持 YY/M/D(如 25/3/22,与旧版一致),也支持 2025-03-22、20250322、3/22、今天/昨天/前天 | |
| max_messages | No | 最多向上回溯的消息条数,默认 2000;目标日期越久远需要调大 | |
| search_pages | No | 在会话列表中滚动查找好友的次数;0 表示直接使用顶部搜索框 | |
| group_members | No | 群成员昵称列表;传入可显著加快群聊记录中发送人的解析 |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |