Skip to main content
Glama
OmniQQ-MCP

OmniQQ-MCP

by haoan33

clear_recent_messages_buffer

DestructiveIdempotent

Clears locally buffered real-time QQ messages, group notifications, and request events to prevent duplicate reads after batch processing or test resets.

Instructions

清空当前登录账号在本地 MCP 内存环形缓冲区中暂存的所有实时消息、群通知与请求事件记录。 适用场景:在完成一批消息处理或测试重置时,主动清空本地内存缓冲以避免重复读取旧事件。不适用与替代:本工具仅清空本地内存缓存,不会撤回 QQ 聊天消息(撤回请用 delete_msg)也不会清除 QQ 客户端未读红点(标记已读请通过 call_napcat_api 调用 mark_msg_as_read)。 行为与副作用:本地破坏性且不可逆的内存清空操作(不影响 QQ 服务器端历史记录,后续可通过 call_napcat_api 调用 get_friend_msg_history / get_group_msg_history 重新从服务器拉取);返回被清除的记录总数 cleared_count。

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

Input Schema

NameRequiredDescriptionDefault

No arguments

Output Schema

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

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv1.2.2
    • 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.8/5.0
Behavior5/5

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

Annotations already flag destructive/irreversible/idempotent, but the description adds the crucial distinction that the destruction is local-only and does not affect server-side history, which can be re-pulled via get_friend_msg_history/get_group_msg_history. It also discloses the return payload (cleared_count), giving the agent consequences and recovery paths not present in structured fields.

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?

Well front-loaded with clearly labeled sections (适用场景 / 不适用与替代 / 行为与副作用), so an agent can scan to the relevant part. Slightly dense with some repeated phrasing ('本地 MCP 内存环形缓冲区' vs '本地内存缓存'), but every sentence carries operational meaning.

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?

Covers purpose, alternatives, destructive scope, non-effect on server data, recovery path, and return value, even though an output schema already exists. For a zero-param destructive buffer flush, nothing an agent needs before calling is missing.

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

Parameters4/5

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

The tool takes zero parameters, so there is nothing parameter-level to clarify; the description correctly avoids inventing any. Baseline 4 applies for a parameterless tool.

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 precise verb+resource+scope: clearing ALL realtime messages, group notices and request events buffered in the local MCP in-memory ring buffer for the current logged-in account. The scope (local buffer only) immediately distinguishes it from sibling tools like get_recent_messages and delete_msg.

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?

Explicitly names when to use it (after finishing a batch of message handling or when resetting tests to avoid re-reading stale events) and when NOT to use it, routing the agent to `delete_msg` for recalling QQ messages and to `call_napcat_api`/`mark_msg_as_read` for clearing unread badges.

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