Skip to main content
Glama
OmniQQ-MCP

OmniQQ-MCP

by haoan33

delete_msg

Destructive

Permanently recall a specified message from a private or group chat, useful for removing mistakenly sent messages or violating group posts as an administrator.

Instructions

从私聊或群聊会话中永久撤回指定消息 (OneBot 11: delete_msg)。 适用场景:发错消息需紧急撤回,或作为群主/群管理员撤回群成员的违规发言。不适用与替代:若仅需将群精华消息移出精华列表或删除群共享文件,请通过 call_napcat_api 调用 delete_essence_msg 或 delete_group_file。 参数约束:传入的 message_id 必须来自 send_private_msg、send_group_msg 的返回值或 get_recent_messages 消息记录中的有效整数 ID。 行为与权限限制:不可逆的破坏性操作(撤回后消息无法恢复);撤回自身消息受 QQ 平台 2 分钟时效限制,撤回他人群消息要求当前账号在该群具备管理员或群主权限,超时或权限不足将返回非 0 retcode。

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "message_id": "<message_id>"
    },
    "name": "delete_msg"
  }
}

Input Schema

NameRequiredDescriptionDefault
message_idYes目标消息的唯一整数 ID(由发送接口返回或从近期消息列表中获取)

Output Schema

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

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv1.2.2
    • changedInput schema / properties / message_id / description
      Previous value: -"目标消息 ID"New value: +"目标消息的唯一整数 ID(由发送接口返回或从近期消息列表中获取)"
    • 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?

Although annotations already declare destructiveHint=true and idempotentHint=false, the description adds context they cannot carry: irreversibility, the 2-minute platform time limit on self-deletion, the admin/owner permission requirement for deleting others' group messages, and the failure signal (non-zero retcode). That is exactly the extra context this dimension rewards.

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?

The description is front-loaded with the action, then clearly partitioned into 适用场景 / 不适用与替代 / 参数约束 / 行为与权限限制 labels, so it is scannable despite its length. It is dense but nearly every sentence carries distinct information; the parameter-constraint line is the only one that partly duplicates the schema.

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?

The tool is a single-parameter destructive mutation with an output schema, so return-value explanation is not required, and the description still notes the retcode failure mode. Between the annotations, the schema, and the description's permission and time-limit notes, an agent has everything needed to call it correctly and safely.

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 the single parameter is already documented in the schema, so the baseline is 3. The description only restates the provenance of the ID (from send_* returns or get_recent_messages), adding minor value but no syntax or format details 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?

The description states a specific verb and resource ('从私聊或群聊会话中永久撤回指定消息') and even maps to the underlying OneBot 11 action. It explicitly names sibling capabilities it is not (delete_essence_msg, delete_group_file via call_napcat_api), so an agent can distinguish it without opening a 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 gives explicit when-to-use scenarios (mistaken sends, admin moderation) and an explicit not-this-tool clause naming the alternative path (call_napcat_api with delete_essence_msg / delete_group_file). Nothing about selection is left to inference.

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