Skip to main content
Glama
mcp-group-chat

mcp-group-chat

recent_messages

Retrieve recent group chat messages by fetching the newest message IDs and loading their contents, with oldest-first ordering available for conversation context.

Instructions

读取最近的消息内容。

先查询最新的消息 ID 列表,再批量读取消息内容。默认按从新到旧 返回;设置 oldest_first 后可改为按时间从旧到新返回,便于直接 作为对话上下文。

Args: group_id: 群组 ID。 token: 本人身份令牌。 limit: 最多读取的消息数量。 oldest_first: 是否按时间正序返回。

Returns: 消息信息列表。

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

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

Input Schema

NameRequiredDescriptionDefault
limitNo
tokenYes
group_idYes
oldest_firstNo

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.2

TDQS

A3.6/5.0
Behavior4/5

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

With no annotations supplied, the description carries the full burden and does reasonably well: it discloses the internal two-step ID-then-content retrieval, the default newest-to-oldest ordering, the oldest_first flip, that the token is the caller's own identity credential, and it enumerates failure modes (GroupNotFoundError, AuthenticationError, NotGroupMemberError, InvalidFieldValueError). Pagination, rate limits, and truncation behavior are not covered.

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 behavioral summary is front-loaded in two short sentences, and the Args/Returns/Raises blocks are scannable. The Args section duplicates the schema rather than adding much, which is the only real waste.

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

Completeness3/5

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

An output schema exists, so the 'Returns: 消息信息列表' line is minimal but acceptable, and error cases are well covered. For a 4-parameter read tool among several competing message readers, however, the absence of any routing guidance toward read_messages/list_messages and of pagination/limit-range detail leaves gaps.

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 0%, so the description must compensate, and its Args block mostly restates parameter names ('group_id: 群组 ID'). It does add real meaning for token ('本人身份令牌' — the caller's own credential), limit (maximum count to read), and oldest_first (chronological ordering, tied to the conversation-context use case), but leaves group_id format/ID-type and limit's valid range or default unstated.

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 opens with a specific verb and resource ('读取最近的消息内容') and explains the two-step retrieval of recent message IDs followed by batch content reads. It is clear about what the tool returns, but it never distinguishes itself from siblings like read_messages, list_messages, or get_message, so the agent must infer the difference.

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 only implied: the note that oldest_first makes the output directly usable as conversation context hints at the intended use case, but there is no explicit when-to-use/when-not-to-use guidance and no named alternative among the many message-reading siblings.

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