get_latest_events
Retrieve recent session events in reverse chronological order to access the most current user messages, tool calls, or assistant responses. Supports filtering by event type and session ID prefix matching.
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 |