clear_recent_messages_buffer
Clears locally buffered real-time QQ messages, group notifications, and request events to prevent duplicate reads after batch processing or test resets.
Instructions
清空当前登录账号在本地 MCP 内存环形缓冲区中暂存的所有实时消息、群通知与请求事件记录。
适用场景:在完成一批消息处理或测试重置时,主动清空本地内存缓冲以避免重复读取旧事件。不适用与替代:本工具仅清空本地内存缓存,不会撤回 QQ 聊天消息(撤回请用 delete_msg)也不会清除 QQ 客户端未读红点(标记已读请通过 call_napcat_api 调用 mark_msg_as_read)。
行为与副作用:本地破坏性且不可逆的内存清空操作(不影响 QQ 服务器端历史记录,后续可通过 call_napcat_api 调用 get_friend_msg_history / get_group_msg_history 重新从服务器拉取);返回被清除的记录总数 cleared_count。
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": "clear_recent_messages_buffer"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| data | No | 接口返回的业务负载数据(对象或数组,具体字段依工具而定) | |
| status | No | 执行状态标识,成功为 'ok'(或特定生命周期状态),失败为 'failed' 或 'error' | |
| message | No | 状态说明或错误诊断详情 | |
| retcode | No | OneBot 11 响应状态码,0 表示成功,非 0 表示协议端或网络错误 |