check_napcat_environment
Checks local NapCatQQ runtime, OneBot ports 3000/3001, cached accounts, and latest GitHub release to diagnose connection failures and update needs.
Instructions
检查本地 NapCatQQ 运行时安装状态、OneBot 端口 (3000/3001) 监听情况、本地缓存账号列表,并请求 GitHub Release API 对比官方最新版本。
适用场景:首次连接、排查接口调用失败或判断是否有新版本可升级时优先调用。不适用与替代:若仅需读取当前在线 QQ 的 user_id 与昵称,请改用轻量级的 get_login_info(无需请求 GitHub,速度更快)。
行为与返回:纯只读无副作用操作(包含一次约 5 秒超时的外部 GitHub 版本探测);返回包含 installed、port_listening、cached_accounts、latest_release 及 needs_update 诊断结论的字典,失败时在相应字段返回原因。
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": "check_napcat_environment"
}
}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 表示协议端或网络错误 |