get_latest_events
Fetch recent events from a session in reverse chronological order. Use to find the last user message, tool call, or assistant response. Supports filtering by event type and session ID prefix match.
Instructions
Get the N most recent events in a session, in reverse chronological order (sequence DESC). Use this when you need 'what was the latest X' — e.g., the last user message, the last tool call, the last assistant response. Semantic search is the wrong tool for recency; this one is. Supports session id prefix match.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| session_id | Yes | ||
| limit | No | Max events to return (default 10) | |
| event_type | No | Optional: filter to a single event type (user_message, assistant_text, tool_call, etc.) | |
| max_chars | No | Max total output characters |