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
| Name | Required | Description | Default |
|---|---|---|---|
| end | No | ||
| after | No | ||
| limit | No | ||
| order | No | asc | |
| start | No | ||
| token | Yes | ||
| before | No | ||
| group_id | Yes | ||
| sender_id | No | ||
| descending | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |