get_platform_session_messages
Retrieve recent chat messages from AstrBot logs for debugging and monitoring, using log history as the reliable source when conversation data is unavailable.
Instructions
Get a platform target's recent messages from AstrBot logs.
This tool intentionally uses AstrBot's log broker history (/api/log-history) as the source of truth, since some AstrBot builds do not persist platform conversation history under /api/conversation/detail for group/user targets.
Args:
target_id: Platform target ID (e.g. group_id like "1030223077").
platform_id: Optional platform id (e.g. "napcat"). If omitted, use the first enabled platform.
message_type: "GroupMessage" or "FriendMessage" (default: "GroupMessage").
wait_seconds: If > 0, poll and return SSE-like events for up to this many seconds.
max_messages: Max number of history items to return (from the tail).
poll_interval_seconds: Poll interval when wait_seconds > 0.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| target_id | Yes | ||
| platform_id | No | ||
| message_type | No | GroupMessage | |
| wait_seconds | No | ||
| max_messages | No | ||
| poll_interval_seconds | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||