Skip to main content
Glama

read_chat

Read-only

Reads the latest messages from a private or group chat in readable order and pages back through older messages, marking the chat as read.

Instructions

Read the latest messages of a private or group chat as readable lines (oldest first). Page back with before_message_id = the oldest message_id you got. Marks the chat as read for get_unread. Note: older server history is reachable once the chat has had at least one message since QQ logged in on the server; everything seen since then is kept.

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": {
      "target": "<target>"
    },
    "name": "read_chat"
  }
}

Input Schema

NameRequiredDescriptionDefault
countNoHow many messages (max 200)
targetYesWho to talk to: "qq:<QQ号>" for a friend/private chat, "group:<群号>" for a group, a bare number, or a friend remark/nickname/group name (must be unambiguous).
mark_read_on_qqNoAlso clear the unread badge in QQ itself
before_message_idNoReturn messages older than this message_id

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4/5.0
Behavior4/5

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

Discloses a real side effect not covered by annotations: the call marks the chat as read for get_unread, with an additional opt-in via mark_read_on_qq. It also discloses a history-availability caveat tied to server login time. The read-marking is arguably a state change despite readOnlyHint=true, but it is stated plainly rather than hidden, so the agent is not misled.

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?

Front-loaded with purpose, then pagination, then side effects, then caveat — each sentence carries distinct information. The final history-availability sentence is dense and slightly hard to parse, which costs a point against a perfect score.

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?

Covers purpose, ordering, pagination, side effects, and a history limitation, which is strong for a read tool with no output schema. It stops short of describing what a 'readable line' contains, so an agent doesn't know the returned fields.

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?

Schema coverage is already 100%, so the baseline is 3, but the description earns above baseline by explaining the pagination recipe for before_message_id (feed it the oldest message_id received) and noting the mark_read_on_qq option's effect in QQ itself.

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?

States a specific verb and resource ('Read the latest messages of a private or group chat as readable lines, oldest first'), including ordering. It implies the distinction from search_chat (latest vs. search) and get_unread, but never names a sibling explicitly, so differentiation is inferred rather than stated.

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

Usage Guidelines4/5

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

Gives concrete operational guidance: page backward using before_message_id set to the oldest message_id received. It also ties itself to get_unread by explaining the read-marking consequence. What's missing is an explicit statement of when to choose search_chat or get_unread instead.

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