Skip to main content
Glama

get_friend_msg_history

Read-only

Retrieve a friend's QQ message history, starting from the latest bidirectional records or from a specific message anchor.

Instructions

获取好友消息历史(无锚点时从服务器获取最新双向记录) 省略 message_id 从最新消息开始;只读取当前账号消息。 Returns: { messages }:好友消息事件对象数组(每项为 OneBot 消息事件,内部字段不固定)。

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": {
      "user_id": "<user_id>"
    },
    "name": "get_friend_msg_history"
  }
}

Input Schema

NameRequiredDescriptionDefault
countNo无锚点时从 QQ 服务器获取最新双向历史;服务器或身份解析失败时动作失败,不返回不完整的本地缓存
user_idYes
message_idNo
reverse_orderNo仅在 message_id 非 0 时生效;true 返回锚点及更旧消息,false 返回锚点及更新消息

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.8/5.0
Behavior4/5

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

Annotations already cover the safety profile (readOnly, openWorld, non-destructive), and the description adds real context: unanchored calls hit the server for the latest bidirectional records, only the current account's messages are read, and the return is an array of OneBot message events with non-fixed inner fields. The server-failure/no-partial-cache behavior appears only in the count parameter's schema text, not here, which keeps it from a 5.

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

Conciseness5/5

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

Three compact clauses with the core behavior (and its unanchored caveat) front-loaded, followed by the scope constraint and the return shape. No filler sentences.

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

Completeness4/5

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

For a four-parameter read tool with no output schema, the description supplies the return shape and the key anchoring rule. It stops short of describing pagination/ordering semantics for reverse_order beyond what the schema already says, but nothing critical to calling it correctly is missing.

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 coverage is 50%: count and reverse_order are documented in the schema, while user_id and message_id have none. The description compensates partly by explaining that omitting message_id starts from the latest message, but adds nothing about user_id's accepted forms or how count interacts with the server fetch.

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

Purpose4/5

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

The description gives a specific verb and resource ('获取好友消息历史') plus a clarifying parenthetical that the unanchored mode pulls the newest bidirectional records from the server. The '好友' (friend) scope plus '只读取当前账号消息' separates it from the group-history sibling without naming it explicitly.

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

Usage Guidelines3/5

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

It states a useful conditional: omit message_id to start from the newest message. However, it never contrasts this tool with get_group_msg_history or get_msg, and gives no when-not-to-use guidance, so tool selection is only implied by the friend-scope wording.

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

Deploy Server

Other Tools