batch_get_recent_context
Batch query recent message context from multiple group or private targets. Define targets with optional type and message limit to reduce API calls.
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).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| targets | Yes | ||
| limit | No |