Skip to main content
Glama
study-flamingo

D&D MCP Server

add_event

Log events to track combat, roleplay, exploration, quests, characters, world developments, or sessions in your D&D campaign adventure log.

Instructions

Add an event to the adventure log.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
event_typeYesType of event
titleYesEvent title
descriptionYesEvent description
session_numberNoSession number
characters_involvedNoCharacters involved in the event
locationNoLocation where event occurred
importanceNoEvent importance (1-5)
tagsNoTags for categorizing the event

Implementation Reference

  • The MCP tool handler for 'add_event' decorated with @mcp.tool (registration). Defines input schema via Annotated parameters with descriptions and validations. Constructs AdventureEvent, calls storage to persist, returns confirmation.
    @mcp.tool
    def add_event(
        event_type: Annotated[Literal["combat", "roleplay", "exploration", "quest", "character", "world", "session"], Field(description="Type of event")],
        title: Annotated[str, Field(description="Event title")],
        description: Annotated[str, Field(description="Event description")],
        session_number: Annotated[int | None, Field(description="Session number", ge=1)] = None,
        characters_involved: Annotated[list[str] | None, Field(description="Characters involved in the event")] = None,
        location: Annotated[str | None, Field(description="Location where event occurred")] = None,
        importance: Annotated[int, Field(description="Event importance (1-5)", ge=1, le=5)] = 3,
        tags: Annotated[list[str] | None, Field(description="Tags for categorizing the event")] = None,
    ) -> str:
        """Add an event to the adventure log."""
        event = AdventureEvent(
            event_type=EventType(event_type),
            title=title,
            description=description,
            session_number=session_number,
            characters_involved=characters_involved or [],
            location=location,
            importance=importance,
            tags=tags or []
        )
    
        storage.add_event(event)
        return f"Added {event_type.lower} event: '{event.title}'"
  • Pydantic BaseModel schema for AdventureEvent used by the tool for data validation and serialization.
    class AdventureEvent(BaseModel):
        """Individual event in the adventure log."""
        id: str = Field(default_factory=lambda: random(length=8))
        event_type: EventType
        title: str
        description: str
        timestamp: datetime = Field(default_factory=datetime.now)
        session_number: int | None = None
        characters_involved: list[str] = Field(default_factory=list)
        location: str | None = None
        tags: list[str] = Field(default_factory=list)
        importance: int = Field(ge=1, le=5, default=3)  # 1=minor, 5=major
  • Storage class helper method that appends the event to the internal list and saves to persistent storage.
    def add_event(self, event: AdventureEvent) -> None:
        """Add an event to the adventure log."""
        logger.info(f"➕ Adding event: '{event.title}' ({event.event_type})")
        self._events.append(event)
        self._save_events()
        logger.debug("✅ Event added and log saved.")
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries full burden for behavioral disclosure. 'Add an event' implies a write/mutation operation, but the description doesn't mention permissions required, whether this creates permanent records, what happens on duplicate events, or any rate limits. For a mutation tool with zero annotation coverage, this leaves significant behavioral questions unanswered.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that states the core purpose without any wasted words. It's appropriately sized for a tool with comprehensive schema documentation and gets straight to the point with no unnecessary elaboration.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a mutation tool with 8 parameters, no annotations, and no output schema, the description is inadequate. It doesn't explain what constitutes an 'event' in this context, how events relate to other entities (sessions, characters, etc.), what happens after adding, or what the tool returns. The comprehensive schema helps, but the description should provide more context about the tool's role in the system.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has 100% description coverage, providing complete documentation for all 8 parameters including their types, constraints, and purposes. The description adds no parameter-specific information beyond what's already in the schema, so it meets the baseline of 3 where the schema does the heavy lifting.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('Add') and target resource ('event to the adventure log'), which is specific and unambiguous. However, it doesn't differentiate from sibling tools like 'add_session_note' or 'add_item_to_character' that also add content to the system, leaving room for confusion about when to choose this specific tool.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. With sibling tools like 'add_session_note' and 'create_quest' that might overlap in functionality, there's no indication of when this tool is appropriate versus those alternatives, nor any prerequisites or constraints mentioned.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/study-flamingo/gamemaster-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server