batch_get_recent_context
Retrieve recent message history for multiple QQ chat targets in a single operation, reducing API calls compared to individual queries.
Instructions
Batch query recent message context for multiple targets.
More efficient than calling get_recent_context multiple times: uses at most 2 OneBot API calls (group list + friend list) regardless of how many targets are queried.
Args: targets: List of dicts, each with "target" (ID) and optional "target_type" ("group" or "private", default "group"). Example: [{"target": "123", "target_type": "group"}, {"target": "456", "target_type": "private"}] limit: Number of recent messages per target (default 50).
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": {
"targets": "<targets>"
},
"name": "batch_get_recent_context"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| targets | Yes | ||
| limit | No |