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
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | ||
| token | Yes | ||
| group_id | Yes | ||
| oldest_first | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |