create_quest
Generate structured quests for D&D campaigns by defining objectives, rewards, givers, and narrative details to organize adventure content.
Instructions
Create a new quest.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| title | Yes | Quest title | |
| description | Yes | Quest description | |
| giver | No | Quest giver (NPC name) | |
| objectives | No | Quest objectives | |
| reward | No | Quest reward | |
| notes | No | Additional notes |
Implementation Reference
- src/gamemaster_mcp/main.py:497-517 (handler)The main handler function for the 'create_quest' tool. It is registered via the @mcp.tool decorator, defines the input schema using Pydantic's Annotated and Field, creates a Quest model instance, and persists it using the storage layer.@mcp.tool def create_quest( title: Annotated[str, Field(description="Quest title")], description: Annotated[str, Field(description="Quest description")], giver: Annotated[str | None, Field(description="Quest giver (NPC name)")] = None, objectives: Annotated[list[str] | None, Field(description="Quest objectives")] = None, reward: Annotated[str | None, Field(description="Quest reward")] = None, notes: Annotated[str, Field(description="Additional notes")] = "", ) -> str: """Create a new quest.""" quest = Quest( title=title, description=description, giver=giver, objectives=objectives or [], reward=reward, notes=notes ) storage.add_quest(quest) return f"Created quest '{quest.title}'"