get_login_info
Retrieve the current online QQ account's QQ number and nickname to confirm the active login or verify OneBot connectivity.
Instructions
获取当前在线 QQ 账号的基础身份信息,返回 user_id(QQ 号)与 nickname(昵称)(OneBot 11: get_login_info)。
适用场景:快速确认当前是哪个 QQ 号在线,或验证 OneBot 接口连通性。不适用与替代:若需检查本地所有已缓存的历史账号列表或运行时安装与 GitHub 最新版本对比,请改用 check_napcat_environment。
行为与返回:纯只读无副作用操作;成功返回 status='ok' 及 data: {"user_id": int, "nickname": str},若当前未登录或服务未启动则返回 status='failed' 及非 0 retcode。
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": "get_login_info"
}
}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 表示协议端或网络错误 |