Skip to main content
Glama
OmniQQ-MCP

OmniQQ-MCP

by haoan33

start_napcat_service

Idempotent

Starts the local NapCatQQ background service, waits for OneBot ports 3000/3001 to become ready, and attaches a WebSocket event listener; handles conflicting QQ processes and QR-code login when required.

Instructions

启动本地 NapCatQQ 后台服务进程并等待 OneBot (3000/3001) 端口就绪,同时挂载后台 WebSocket 事件监听。 适用场景:当本地服务处于停止状态、需要以默认或指定已缓存账号拉起后台进程时调用(启动前会自动检查并结束冲突的独立 QQ.exe 进程;若检测到需要扫码登录,会自动把登录二维码放到桌面并提示用户打开扫描)。不适用与替代:若服务已在运行且需切换其他已缓存账号,请改用 switch_qq_account。 行为与返回:幂等操作——启动前先结束冲突的独立 QQ.exe 进程;若端口已在监听则返回 status='already_running';新启动成功返回 status='started';若需扫码登录则将二维码导出至桌面并返回 login_required=True 及 desktop_qrcode_path。

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": "start_napcat_service"
  }
}

Input Schema

NameRequiredDescriptionDefault
uinNo指定要自动登录的 5~11 位纯数字 QQ 号字符串;留空则使用本地配置中的当前默认账号
wait_secondsNo启动进程后轮询等待 OneBot HTTP 端口监听就绪的最大秒数,默认 25

Output Schema

NameRequiredDescriptionDefault
dataNo接口返回的业务负载数据(对象或数组,具体字段依工具而定)
statusNo执行状态标识,成功为 'ok'(或特定生命周期状态),失败为 'failed' 或 'error'
messageNo状态说明或错误诊断详情
retcodeNoOneBot 11 响应状态码,0 表示成功,非 0 表示协议端或网络错误

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changedv1.2.2
    • changedInput schema / properties / uin / description
      Previous value: -"指定要登录启动的 QQ 号 (留空则使用默认激活账号)"New value: +"指定要自动登录的 5~11 位纯数字 QQ 号字符串;留空则使用本地配置中的当前默认账号"
    • changedInput schema / properties / wait_seconds / description
      Previous value: -"等待端口监听的最大秒数"New value: +"启动进程后轮询等待 OneBot HTTP 端口监听就绪的最大秒数,默认 25"
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "additionalProperties": true,
      +  "properties": {
      +    "data": {
      +      "description": "接口返回的业务负载数据(对象或数组,具体字段依工具而定)"
      +    },
      +    "message": {
      +      "description": "状态说明或错误诊断详情",
      +      "type": "string"
      +    },
      +    "retcode": {
      +      "description": "OneBot 11 响应状态码,0 表示成功,非 0 表示协议端或网络错误",
      +      "type": "integer"
      +    },
      +    "status": {
      +      "description": "执行状态标识,成功为 'ok'(或特定生命周期状态),失败为 'failed' 或 'error'",
      +      "type": "string"
      +    }
      +  },
      +  "type": "object"
      +}
  2. Changed1 schema field changedv1.1.0
    • addedInput schema / additionalProperties
      Added value: +false
  3. First observedv1.0.0

TDQS

A4.6/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Goes well beyond the annotations: it discloses that it kills conflicting standalone QQ.exe processes, that the operation is idempotent with status='already_running' when ports are already listening, that success returns status='started', and that a scan-login path exports a QR code to the desktop with login_required=True and desktop_qrcode_path. These side effects (process termination, desktop file write, login gating) are not captured by destructiveHint=false/idempotentHint=true.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Organized into labeled sections (适用场景 / 不适用与替代 / 行为与返回) with the core action front-loaded in the first sentence. Slightly dense, but each block carries distinct information an agent needs; little is redundant.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a service-start tool with an output schema present, the description covers the preconditions (stopped service, conflict-killing), the failure/login path, and the alternative tool — everything needed to invoke it correctly. Return-value detail is already partly covered by the output schema.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100% and both parameters (uin, wait_seconds) are already fully documented in the schema, so this is the baseline case. The description only indirectly gestures at uin via '默认或指定已缓存账号' and adds nothing about wait_seconds polling semantics beyond the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource: launch the local NapCatQQ background service process, wait for OneBot ports 3000/3001, and attach the WebSocket event listener. It also explicitly excludes the sibling case ('若服务已在运行且需切换其他已缓存账号,请改用 switch_qq_account'), so an agent can distinguish it from switch_qq_account without opening either schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It has an explicit '适用场景' section (local service stopped, needs default or cached account brought up) and an explicit '不适用与替代' section naming switch_qq_account for the running-service account-switch case. The conditions that select this tool versus the alternative are stated outright.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.