add_event
Add events to your D&D adventure log to track combat, roleplay, exploration, quests, characters, world events, sessions, and social interactions with detailed descriptions and metadata.
Instructions
Add an event to the adventure log.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| event_type | Yes | Type of event | |
| description | Yes | Event description | |
| title | No | Event title (optional, auto-generated from description if omitted) | |
| session_number | No | Session number | |
| characters_involved | No | Characters involved — list or JSON array string, e.g. '["name1","name2"]' | |
| location | No | Location where event occurred | |
| importance | No | Event importance (1-5) | |
| tags | No | Tags for categorizing the event — list or JSON array string, e.g. '["npc","story"]' |
Implementation Reference
- The `add_event` method in `TimelineTracker` class adds a new event to the timeline, automatically assigning an ID if none exists, and then sorting the events chronologically.
def add_event(self, event: TimelineEvent) -> str: """ Add an event to the timeline. Events are automatically sorted chronologically after addition. Args: event: The event to add Returns: The event's ID (auto-generated if not provided) """ if not event.id: event.id = f"evt_{uuid4().hex[:8]}" self._events.append(event) self._events.sort(key=lambda e: e.game_time._to_total_minutes()) return event.id