LoreKeeper MCP
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| DEBUG | No | Enable debug mode | false |
| DB_PATH | No | Database path for SQLite cache | ./data/cache.db |
| LOG_LEVEL | No | Logging level (e.g., DEBUG, INFO, WARNING, ERROR) | INFO |
| CACHE_TTL_DAYS | No | Cache time-to-live in days | 7 |
| DND5E_BASE_URL | No | Base URL for D&D 5e API | https://www.dnd5eapi.co/api |
| OPEN5E_BASE_URL | No | Base URL for Open5e API | https://api.open5e.com |
| ERROR_CACHE_TTL_SECONDS | No | Error cache time-to-live in seconds | 300 |
Capabilities
Features and capabilities supported by this server
| Capability | Details |
|---|---|
| tools | {
"listChanged": true
} |
| prompts | {
"listChanged": false
} |
| resources | {
"subscribe": false,
"listChanged": false
} |
| experimental | {} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| list_documentsA | List all available D&D content documents in the cache. This tool queries the cache to discover which source documents are available across all data sources (Open5e API, D&D 5e API, OrcBrew imports). Use this to see which books, supplements, and homebrew content you have access to, then use the documents parameter in other tools to filter content. IMPORTANT: This shows only documents currently in your cache. Run the build command to populate your cache with content from configured sources. Examples: # List all available documents docs = await list_documents() Args: source: Optional source filter. Valid values: - "open5e_v2": Open5e API documents (SRD, Kobold Press, etc.) - "orcbrew": Imported OrcBrew homebrew files - None (default): Show documents from all sources Returns: List of document dictionaries, each containing: - document: Document name/identifier (use this in documents) - source_api: Which API/source this came from - entity_count: Total number of entities from this document - entity_types: Breakdown of entities by type (spells, creatures, etc.) - publisher: Publisher name (if available, Open5e only) - license: License type (if available, Open5e only) Note:
This queries only the cache and does not make API calls. You must
populate your cache first. Run |
| search_spellA | Search and retrieve D&D 5e spells using the repository pattern. This tool provides comprehensive spell lookup functionality with support for filtering by multiple criteria. Results include complete spell descriptions, components, damage, effects, and availability information. Automatically uses the database cache through the repository for improved performance. The repository pattern handles caching transparently:
Examples: Search for spells: spells = await search_spell(search="fireball") spells = await search_spell(search="healing restoration") Args: level: Exact spell level ranging from 0-9. 0 represents cantrips/0-level spells, 9 represents 9th level spells. Example: 3 for exactly 3rd level spells level_min: Minimum spell level (inclusive) for range-based searches. Use with level_max to find spells in a range. Returns spells at this level or higher. Examples: 1 for 1st level and above, 5 for 5th level and above level_max: Maximum spell level (inclusive) for range-based searches. Use with level_min to find spells in a range. Returns spells at this level or lower. Examples: 3 for up to 3rd level spells, 5 for up to 5th level spells school: Magic school filter for spell type. Valid values: abjuration, conjuration, divination, enchantment, evocation, illusion, necromancy, transmutation. Each school has distinct characteristics. Example: "evocation" for damage-dealing spells, "abjuration" for protective spells class_key: Filter spells available to a specific class. Valid values: wizard, cleric, druid, bard, paladin, ranger, sorcerer, warlock, artificer. Each class has access to different spell lists. Example: "wizard" for spells in wizard spell list concentration: Filter for spells requiring concentration. True returns only concentration spells, False returns only non-concentration spells. Concentration is a key resource in combat. Example: True ritual: Filter for ritual spells. Returns only spells that can be cast as rituals, allowing casting without expending spell slots. Example: True casting_time: Casting time filter to find spells with specific casting times. Examples: "1 action" (most common), "1 bonus action" (quick casts), "1 reaction" (reaction spells), "1 minute" (extended preparation) damage_type: Filter spells by damage type dealt. Examples: "fire" (fire damage), "cold" (cold damage), "necrotic" (necrotic damage), "poison" (poison damage), "psychic" (psychic damage). NEW in Phase 3. documents: Filter to specific source documents. Provide a list of document names/identifiers from list_documents() tool. Examples: ["srd-5e"] for SRD only, ["srd-5e", "tce"] for SRD and Tasha's. Use list_documents() to see available documents. search: Natural language search query for semantic/vector search. When provided, uses vector similarity to find spells matching the conceptual meaning rather than exact text matches. Can be combined with other filters for hybrid search. Examples: "fire damage explosion", "healing allies", "protection from evil creatures" limit: Maximum number of results to return. Default 20. Useful for pagination or limiting large result sets. Examples: 5 for small sets, 20 for standard, 100 for comprehensive results Returns: List of spell dictionaries, each containing: - name: Spell name - level: Spell level (0-9) - school: Magic school - casting_time: How long the spell takes to cast - range: Spell range/area of effect - components: Required components (V/S/M) - material: Material component description (if applicable) - duration: How long the spell lasts - concentration: Whether spell requires concentration - ritual: Whether spell can be cast as a ritual - desc: Full spell description and effects - higher_level: Effect when cast at higher levels - classes: List of classes that can learn this spell - document__slug: Source document reference - damage_type: Damage types dealt by the spell (if applicable) Raises: ApiError: If the API request fails due to network issues or server errors |
| search_creatureA | Search and retrieve D&D 5e creatures using the repository pattern. This tool provides comprehensive creature lookup including full stat blocks, combat statistics, abilities, and special features. Results include complete creature data and are cached through the repository for improved performance. Examples: Basic creature lookup: creatures = await search_creature(search="dragon") creatures = await search_creature(cr=5) medium_creatures = await search_creature(size="Medium") Args: cr: Exact Challenge Rating to search for. Supports fractional values including 0.125, 0.25, 0.5 for weak creatures. Range: 0.125 to 30 Examples: 0.125 (weak minion), 5 (party challenge), 20 (deadly boss) cr_min: Minimum Challenge Rating for range-based searches. Use with cr_max to find creatures in a difficulty band. Examples: 1, 5, 10 cr_max: Maximum Challenge Rating for range-based searches. Together with cr_min, defines the encounter difficulty band. Examples: 3, 10, 15 type: Creature type filter. Valid values include: aberration, beast, celestial, construct, dragon, elemental, fey, fiend, giant, goblinoid, humanoid, monstrosity, ooze, reptile, undead, plant. Examples: "dragon", "undead", "humanoid" size: Size category filter. Valid values: Tiny, Small, Medium, Large, Huge, Gargantuan Examples: "Large" for major encounters, "Tiny" for swarms armor_class_min: Minimum Armor Class filter. Returns creatures with AC at or above this value. Useful for finding well-armored threats. Examples: 15, 18, 20 hit_points_min: Minimum Hit Points filter. Returns creatures with HP at or above this value. Useful for finding creatures with significant endurance. Examples: 50, 100, 200 documents: Filter to specific source documents. Provide a list of document names/identifiers from list_documents() tool. Examples: ["srd-5e"] for SRD only, ["srd-5e", "tce"] for SRD and Tasha's. Use list_documents() to see available documents. search: Natural language search query for semantic/vector search. When provided, uses vector similarity to find creatures matching the conceptual meaning rather than exact text matches. Can be combined with other filters for hybrid search. Examples: "fire breathing dragon", "undead horde minion", "intelligent spellcaster" limit: Maximum number of results to return. Default 20, useful for pagination or limiting large result sets. Example: 5 Returns: List of creature stat block dictionaries, each containing: - name: Creature name - size: Size category - type: Creature type - alignment: Alignment (e.g., "chaotic evil") - armor_class: AC (Armor Class) - hit_points: Hit points - hit_dice: Hit dice expression (e.g., "10d10+20") - speed: Movement speeds (walk, fly, swim, burrow, climb) - strength/dexterity/constitution/intelligence/wisdom/charisma: Ability scores - challenge_rating: CR value for encounter building - actions: Possible actions in combat - legendary_actions: Legendary action options (if applicable) - special_abilities: Special abilities and traits - document_url: Source document reference Raises: ApiError: If the API request fails due to network issues or server errors |
| search_character_optionA | Retrieve D&D 5e character creation and advancement options. This tool provides access to classes, races, backgrounds, and feats for character creation and level-up decisions. Each option type provides different information relevant to character building. Results are cached for faster repeated lookups through the repository pattern. The repository pattern handles caching transparently:
Examples: Default usage (automatic repository creation): classes = await search_character_option(type="class") elves = await search_character_option(type="race", search="elf") backgrounds = await search_character_option(type="background", search="soldier") feats = await search_character_option(type="feat", search="great") Args: type: REQUIRED. Character option type. Must be one of: - "class": Player classes (Barbarian, Bard, Cleric, Druid, Fighter, Monk, Paladin, Ranger, Rogue, Sorcerer, Warlock, Wizard) - "race": Playable races (Human, Elf, Dwarf, Halfling, Dragonborn, Gnome, Half-Orc, Half-Elf, Tiefling, etc.) - "background": Character backgrounds (Acolyte, Criminal, Entertainer, Soldier, Folk Hero, Sage, etc.) - "feat": Character feats (Ability Score Improvement, Great Weapon Master, Magic Initiate, etc.) - typically chosen at levels 4, 8, 12, 16, 19 documents: Filter to specific source documents. Provide a list of document names/identifiers from list_documents() tool. Examples: ["srd-5e"] for SRD only, ["srd-5e", "tce"] for SRD and Tasha's. Use list_documents() to see available documents. search: Natural language search query for semantic/vector search. When provided, uses vector similarity to find character options matching the conceptual meaning rather than exact text matches. Can be combined with other filters for hybrid search. Examples: "martial combat warrior", "stealthy rogue", "divine magic healer" limit: Maximum number of results to return. Default 20, useful for limiting output or pagination. Examples: 1, 5, 50 Returns: List of option dictionaries. Structure varies by type: Raises: ValueError: If type parameter is not one of the valid options ApiError: If the API request fails due to network issues or server errors |
| search_equipmentA | is_magic: Magic property filter (weapons). When True, returns only magical weapons. Example: True documents: Filter to specific source documents. Provide a list of document names/identifiers from list_documents() tool. Examples: ["srd-5e"] for SRD only, ["srd-5e", "tce"] for SRD and Tasha's. Use list_documents() to see available documents. search: Natural language search query for semantic/vector search. When provided, uses vector similarity to find equipment matching the conceptual meaning rather than exact text matches. Can be combined with other filters for hybrid search. Examples: "slashing weapon for melee combat", "protective heavy armor", "magical wand for spells" limit: Maximum number of results to return. Default 20. For type="all" with many matches, limit applies to total results. Examples: 5, 20, 100 |
| search_ruleA | Look up D&D 5e game rules, conditions, and reference information. This comprehensive reference tool provides access to core rules, special conditions, damage types, skills, and game mechanics. Essential for resolving rules questions during play or character building. All data is sourced from official D&D 5e materials. Uses the repository pattern with database caching for improved performance. Examples: - search_rule(rule_type="condition", search="grappled") - Find grappled condition rules - search_rule(rule_type="skill", search="stealth") - Find stealth skill details - search_rule(rule_type="damage-type", search="fire") - Find fire damage rules - search_rule(rule_type="rule", section="combat") - Find all combat rules - search_rule(rule_type="ability-score") - Get all ability score info - search_rule(rule_type="alignment") - Find alignment descriptions - search_rule(rule_type="magic-school", search="evocation") - Find evocation school info - search_rule(rule_type="rule", documents=["srd-5e"]) - Find rules from SRD only - search_rule(rule_type="condition", search="grappled", documents=["srd-5e", "tce"]) - Filter conditions by documents Args: rule_type: REQUIRED. Type of game reference to lookup. Must be one of: - "rule": Core game rules and mechanics (combat, spellcasting, movement, etc.) - "condition": Status effects (grappled, stunned, poisoned, unconscious, etc.) - "damage-type": Damage categories (acid, bludgeoning, cold, fire, force, lightning, necrotic, piercing, poison, psychic, radiant, slashing, thunder) - "weapon-property": Weapon special properties (finesse, heavy, light, reach, two-handed, versatile, ammunition, loading, thrown, etc.) - "skill": Ability-based skills (Acrobatics, Animal Handling, Arcana, Athletics, Deception, History, Insight, Intimidation, Investigation, Medicine, Nature, Perception, Performance, Persuasion, Religion, Sleight of Hand, Stealth, Survival) - "ability-score": Core abilities (Strength, Dexterity, Constitution, Intelligence, Wisdom, Charisma) and their uses - "magic-school": Schools of magic (Abjuration, Conjuration, Divination, Enchantment, Evocation, Illusion, Necromancy, Transmutation) - "language": Languages available in D&D (Common, Dwarvish, Elvish, Giant, Gnomish, Goblin, Orc, Primordial, Sylvan, Undercommon, Celestial, Draconic, Deep Speech, Infernal) - "proficiency": Character proficiency types (armor, weapon, tool, saving throw, skill) - "alignment": Character alignment axes (Lawful/Chaotic, Good/Evil, Neutral options) section: For rule_type="rule" only. Filter rules by section/chapter. Examples: "combat", "spellcasting", "movement", "actions-in-combat" Ignored for other rule types. documents: Filter to specific source documents. Provide a list of document names/identifiers from list_documents() tool. Examples: ["srd-5e"] for SRD only, ["srd-5e", "tce"] for SRD and Tasha's. Use list_documents() to see available documents. search: Natural language search query for semantic/vector search. When provided, uses vector similarity to find rules matching the conceptual meaning rather than exact text matches. Can be combined with other filters for hybrid search. Examples: "movement restricted", "fire burning damage", "stealth hiding sneaking" limit: Maximum number of results to return. Default 20 for performance. Examples: 1, 10, 50 Returns: List of rule/reference dictionaries. Structure varies by rule_type: Raises: ValueError: If rule_type is not one of the valid options APIError: If the API request fails due to network issues or server errors |
| search_allA | Search across all D&D content with semantic matching. This tool uses Open5e's unified search endpoint to find content across multiple types (spells, creatures, items, etc.) with fuzzy typo tolerance and semantic conceptual matching. Perfect for exploratory searches like "find anything related to fire" or when you're not sure of exact spelling. Semantic search is always enabled to provide the best conceptual matching. Examples: # Cross-entity search search_all(query="dragon") # Finds dragons, dragon spells, etc. Args: query: Search term (handles typos and concepts automatically) content_types: Limit to specific types: ["Spell", "Creature", "Item", "Background", "Feat"]. Default None searches all content types. documents: Filter results to specific documents. Provide list of document names from list_documents() tool. Post-filters search results by document field. Examples: ["srd-5e"], ["srd-5e", "tce"]. limit: Maximum number of results to return (default 20) Returns: List of content dictionaries with varied structure based on content type. Each result includes a 'type' or 'model' field indicating content type. Raises: ApiError: If the API request fails due to network issues or errors |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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/frap129/lorekeeper-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server