memory_events_clear
Clear consumed events from memory to manage system resources and maintain organized event tracking in the Memora server.
Instructions
Mark events as consumed.
Args: event_ids: List of event IDs to mark as consumed
Returns: Dictionary with count of cleared events
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| event_ids | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |
Implementation Reference
- memora/server.py:1669-1680 (handler)Tool registration and implementation for memory_events_clear which calls _clear_events.
@mcp.tool() async def memory_events_clear(event_ids: List[int]) -> Dict[str, Any]: """Mark events as consumed. Args: event_ids: List of event IDs to mark as consumed Returns: Dictionary with count of cleared events """ cleared = _clear_events(event_ids) return {"cleared": cleared} - memora/server.py:1644-1646 (helper)Helper function wrapping clear_events which executes the database operation.
@_with_connection(writes=True) def _clear_events(conn, event_ids: List[int]): return clear_events(conn, event_ids)