Skip to main content
Glama
mcp-group-chat

mcp-group-chat

list_messages

Retrieve IDs of messages visible to a group member, filtered by sender, time range, order, and limit to review chat history or audit activity.

Instructions

查看当前成员可见的消息 ID 列表。

新入群的成员默认只能看到入群之后的消息,是否可见历史消息由群组 的 history_visible 设置决定。

Args: group_id: 群组 ID。 token: 本人身份令牌。 sender_id: 只查看指定发送者的消息。 start: 起始时间戳(含),单位秒。 end: 结束时间戳(含),单位秒。 order: 排序规则,支持 asc/ascending/oldest/time 与 desc/descending/newest/reverse。 descending: 是否按时间倒序;提供时优先于 order。 limit: 最多返回的消息数量,0 表示不返回。 before: 只查看早于该时间戳的消息。 after: 只查看晚于该时间戳的消息。

Returns: 消息 ID 列表。

Raises: GroupNotFoundError: 群组不存在。 AuthenticationError: 身份验证失败。 NotGroupMemberError: 本人不在群内。 InvalidFieldValueError: 查询参数不合法。

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": {
      "group_id": "<group_id>",
      "token": "<token>"
    },
    "name": "list_messages"
  }
}

Input Schema

NameRequiredDescriptionDefault
endNo
afterNo
limitNo
orderNoasc
startNo
tokenYes
beforeNo
group_idYes
sender_idNo
descendingNo

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.2

TDQS

A3.8/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does substantial work: it discloses the group history_visible visibility rule, that new members see only post-join messages, that only message IDs are returned, that limit=0 yields an empty result, and enumerates the four failure modes (group missing, auth failure, not a member, invalid query fields). It stops short of stating read-only-ness explicitly or describing pagination behavior, which is the main residual gap.

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?

Purpose and the visibility caveat are front-loaded, followed by a clean Args/Returns/Raises structure with one line per parameter. The format is verbose by nature of ten parameters but no sentence is filler; the Raises block earns its place by telling the agent what failures to expect.

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 ten-parameter tool with zero annotation coverage, the definition supplies the visibility rules, error taxonomy, and per-parameter meaning; the presence of an output schema means return shape need not be spelled out further. Only timestamp units for before/after and explicit read-only confirmation are 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?

Schema description coverage is 0%, so the description must compensate, and it documents all ten parameters: sender filter, inclusive start/end with second units, the full set of order aliases, the precedence of descending over order, limit=0 semantics, and before/after bounds. The gap is that before/after units are never stated and their interaction with start/end is left ambiguous.

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 opening line states a specific verb and resource ('查看…消息 ID 列表' – list message IDs visible to the current member), which is more precise than a generic 'list messages'. It does not, however, explicitly distinguish itself from siblings like read_messages or recent_messages, leaving the agent to infer that this returns IDs only while read_messages returns content.

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?

Usage is implied rather than prescribed: the note about history_visible and new members' visibility explains when results will be truncated, but there is no explicit 'use this when…, use read_messages instead when…' routing. No exclusions or prerequisites (e.g. must already be a member) are stated beyond the error list.

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