Skip to main content
Glama
OmniQQ-MCP

OmniQQ-MCP

by haoan33

deploy_or_update_napcat

Deploy or upgrade a local Windows NapCatQQ runtime, extract the package, and configure OneBot 11 ports 3000/3001 after a two-stage confirmation preview.

Instructions

自动下载、解压并部署或升级本地 Windows NapCatQQ 运行时环境,同时自动写入 OneBot 11 (3000/3001) 端口配置。 适用场景:当 check_napcat_environment 显示未安装(选 action='deploy')或存在新版本需升级(选 action='update')时使用。不适用与替代:若运行时已安装且仅需启动、重启或切换账号,请改用 switch_qq_account 或 call_napcat_api,切勿重复重装。 参数约束与两阶段门禁:强制采用两阶段确认锁——首次调用必须传 confirmed=False 获取只读预览计划;向用户展示计划并获得明确许可后,再传 confirmed=True 真正执行文件覆写。target_uin 若指定须为 5~11 位纯数字 QQ 号字符串。 行为与副作用:confirmed=True 时会终止现有本地 NapCat 进程并覆写运行时目录(升级失败或健康检查不通过时自动回滚至旧版本备份);仅支持本地 Windows 模式,外部远程 OneBot URL 调用将直接返回 status='failed'。

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

Input Schema

NameRequiredDescriptionDefault
actionNo执行模式,枚举值 'deploy'(全新部署安装)或 'update'(备份旧版并升级,失败自动回滚),默认 'deploy'deploy
confirmedNo两阶段安全门禁开关;False 时仅返回只读部署预览计划,True 时执行真实下载解压与进程重启
target_uinNo部署后自动绑定 OneBot 端口的 5~11 位纯数字 QQ 号字符串;留空则沿用当前默认账号
use_local_zip_if_availableNo为 True 时优先解压本地已缓存的离线 Release 压缩包以避免重复网络下载,默认 True

Output Schema

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

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed5 schema fields changedv1.2.2
    • changedInput schema / properties / action / description
      Previous value: -"执行动作类型,'deploy' (部署安装) 或 'update' (更新升级)"New value: +"执行模式,枚举值 'deploy'(全新部署安装)或 'update'(备份旧版并升级,失败自动回滚),默认 'deploy'"
    • changedInput schema / properties / confirmed / description
      Previous value: -"是否已获得用户明确许可 (False 时仅返回预览,True 时真正执行解压/下载)"New value: +"两阶段安全门禁开关;False 时仅返回只读部署预览计划,True 时执行真实下载解压与进程重启"
    • changedInput schema / properties / target_uin / description
      Previous value: -"要自动配置 OneBot 11 端口的 QQ 号 (留空则使用当前默认账号)"New value: +"部署后自动绑定 OneBot 端口的 5~11 位纯数字 QQ 号字符串;留空则沿用当前默认账号"
    • changedInput schema / properties / use_local_zip_if_available / description
      Previous value: -"部署时若本地存在离线包是否优先使用"New value: +"为 True 时优先解压本地已缓存的离线 Release 压缩包以避免重复网络下载,默认 True"
    • 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.4/5.0
Behavior4/5

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

Adds substantial context beyond annotations: mandatory two-phase confirmation lock (first call confirmed=False returns a read-only preview), process termination, runtime-directory overwrite, and automatic rollback on failed upgrade/health check, plus local-Windows-only failure mode returning status='failed'. The destructiveHint=false is reconciled by the rollback guarantee, though the text could state the recoverability rationale more explicitly rather than leaving the agent to infer it.

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?

Labeled sections (适用场景 / 不适用与替代 / 参数约束 / 行为与副作用) make it front-loaded and scannable, and the routing information comes before the details. It is longer than necessary in places, restating the two-phase gate that the confirmed parameter description already spells out.

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 mutation tool with an output schema (so return values need not be explained), the description covers everything needed for safe invocation: platform limitation, preview-then-execute flow, rollback behavior, process termination, and the failure status. No gap remains that would cause incorrect calling.

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%, so all four parameters are already documented in structured form, including the 'deploy'/'update' enum semantics and the confirmed gate. The description mostly restates the same constraints (two-phase gate, target_uin 5–11 digit format) and adds little syntax or default behavior that isn't already in the schema. Baseline 3 is appropriate.

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 concrete verb chain (download, extract, deploy/upgrade) applied to a named resource (local Windows NapCatQQ runtime) plus the OneBot 11 port config write. It explicitly distinguishes itself from check_napcat_environment (precondition) and from switch_qq_account / call_napcat_api (post-install operations), so the agent can pick it 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?

Gives explicit when-to-use triggers tied to a sibling's output (`check_napcat_environment` shows not installed → action='deploy'; new version available → action='update') and an explicit when-not-to-use with named alternatives ('already installed and only need start/restart/switch account → use switch_qq_account or call_napcat_api, do not reinstall'). Both directions of routing are covered.

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