Skip to main content
Glama
frap129

LoreKeeper MCP

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
DEBUGNoEnable debug modefalse
DB_PATHNoDatabase path for SQLite cache./data/cache.db
LOG_LEVELNoLogging level (e.g., DEBUG, INFO, WARNING, ERROR)INFO
CACHE_TTL_DAYSNoCache time-to-live in days7
DND5E_BASE_URLNoBase URL for D&D 5e APIhttps://www.dnd5eapi.co/api
OPEN5E_BASE_URLNoBase URL for Open5e APIhttps://api.open5e.com
ERROR_CACHE_TTL_SECONDSNoError cache time-to-live in seconds300

Capabilities

Features and capabilities supported by this server

CapabilityDetails
tools
{
  "listChanged": true
}
prompts
{
  "listChanged": false
}
resources
{
  "subscribe": false,
  "listChanged": false
}
experimental
{}

Tools

Functions exposed to the LLM to take actions

NameDescription
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()

# List only Open5e documents
docs = await list_documents(source="open5e_v2")

# List only OrcBrew homebrew
docs = await list_documents(source="orcbrew")

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)

Documents are sorted by entity count (highest first).

Note: This queries only the cache and does not make API calls. You must populate your cache first. Run lorekeeper sync to populate your cache from Open5e, and lorekeeper import <file> for OrcBrew content.

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:

  • First call: Fetches from API and caches in database

  • Subsequent calls: Returns cached results if available

  • Supports test context-based repository injection via _repository_context

Examples: Search for spells: spells = await search_spell(search="fireball") spells = await search_spell(search="healing restoration")

Filtering by level:
    cantrips = await search_spell(level=0)
    high_level_spells = await search_spell(level=5)

Using level ranges:
    mid_level_spells = await search_spell(level_min=3, level_max=5)
    powerful_spells = await search_spell(level_min=5)
    beginner_spells = await search_spell(level_max=2)

Filtering by school and other properties:
    evocation_spells = await search_spell(school="evocation")
    wizard_spells = await search_spell(class_key="wizard")
    ritual_spells = await search_spell(ritual=True)
    concentration_spells = await search_spell(concentration=True)

Filtering by damage type:
    fire_spells = await search_spell(damage_type="fire")
    cold_spells = await search_spell(damage_type="cold")
    necrotic_spells = await search_spell(damage_type="necrotic")

Filtering by document:
    srd_only = await search_spell(documents=["srd-5e"])
    srd_and_tasha = await search_spell(documents=["srd-5e", "tce"])

Complex queries combining multiple filters:
    evocation_fire_spells = await search_spell(
        school="evocation", damage_type="fire"
    )
    cleric_rituals = await search_spell(
        class_key="cleric", ritual=True, level_min=1
    )
    mid_level_wizard_spells = await search_spell(
        class_key="wizard", level_min=3, level_max=5, limit=10
    )

Semantic search (natural language queries):
    fire_spells = await search_spell(search="fire damage explosion")
    healing_spells = await search_spell(search="restore health allies")
    protection = await search_spell(search="defensive barrier ward")

Hybrid search (search + filters):
    fire_evocation = await search_spell(
        search="fire explosion", school="evocation"
    )
    low_level_healing = await search_spell(
        search="heal wounds", level_max=3
    )

With test context injection (testing):
    from lorekeeper_mcp.tools.search_spell import _repository_context
    custom_repo = SpellRepository(cache=my_cache)
    _repository_context["repository"] = custom_repo
    spells = await search_spell(level=0)

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")

Using challenge rating ranges:
    low_cr_creatures = await search_creature(cr_max=2)
    mid_level_threats = await search_creature(cr_min=3, cr_max=5)
    deadly_bosses = await search_creature(cr_min=10)

Filtering by type and size:
    undead_creatures = await search_creature(type="undead")
    humanoids = await search_creature(type="humanoid", cr_max=2)
    large_creatures = await search_creature(size="Large", limit=10)

Using armor class and hit points filters:
    well_armored_creatures = await search_creature(armor_class_min=15)
    heavily_armored = await search_creature(armor_class_min=18)
    tanky_creatures = await search_creature(hit_points_min=100)
    deadly_tanky = await search_creature(
        armor_class_min=16, hit_points_min=75, cr_min=5
    )

With document filtering:
    srd_only = await search_creature(documents=["srd-5e"])
    tasha_creatures = await search_creature(
        documents=["srd-5e", "tce"]
    )
    phb_and_dmg = await search_creature(
        documents=["phb", "dmg"], cr_min=5
    )

Semantic search (natural language queries):
    fire_creatures = await search_creature(
        search="fire breathing flying beast"
    )
    undead_minions = await search_creature(
        search="shambling corpse horde"
    )
    intelligent_foes = await search_creature(
        search="cunning spellcaster manipulator"
    )

Hybrid search (search + filters):
    fire_dragons = await search_creature(
        search="fire breathing", type="dragon", cr_min=10
    )
    weak_undead = await search_creature(
        search="shambling minion", type="undead", cr_max=2
    )

With test context injection (testing):
    from lorekeeper_mcp.tools.search_creature import _repository_context
    custom_repo = CreatureRepository(cache=my_cache)
    _repository_context["repository"] = custom_repo
    creatures = await search_creature(size="Tiny")

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:

  • First call: Fetches from API and caches in database

  • Subsequent calls: Returns cached results if available

  • Supports test context-based repository injection via _repository_context

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")

With test context injection (testing):
    from lorekeeper_mcp.tools.search_character_option import _repository_context
    custom_repo = CharacterOptionRepository(cache=my_cache)
    _repository_context["repository"] = custom_repo
    classes = await search_character_option(type="class")

Semantic search (natural language queries):
    warriors = await search_character_option(
        type="class", search="martial combat warrior"
    )
    sneaky_classes = await search_character_option(
        type="class", search="stealthy shadow assassin"
    )
    magical_races = await search_character_option(
        type="race", search="innate magical abilities"
    )

Hybrid search (search + filters):
    srd_fighters = await search_character_option(
        type="class", search="melee fighter", documents=["srd-5e"]
    )

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:

For type="class":
    - name: Class name
    - hit_dice: Hit die value (1d8, 1d10, 1d12)
    - class_levels: Progression table
    - spellcasting: Spell slots if applicable
    - features: Class features by level

For type="race":
    - name: Race name
    - ability_score_increase: Ability score bonuses
    - age: Aging information
    - alignment: Typical alignments
    - size: Size category
    - speed: Movement speed
    - languages: Known languages
    - traits: Racial traits and special abilities

For type="background":
    - name: Background name
    - skill_proficiencies: Skill choices
    - tool_proficiencies: Tools (if any)
    - feature: Special background feature
    - personality_traits: Suggested personality options
    - ideals: Suggested ideals
    - bonds: Suggested character bonds
    - flaws: Suggested character flaws

For type="feat":
    - name: Feat name
    - description: Feat benefits and requirements
    - ability_score_increase: Ability bonuses (if any)
    - prerequisites: Requirements to take feat

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
Search and retrieve D&D 5e weapons, armor, and magic items using the repository pattern.

This tool provides comprehensive equipment lookup across weapons, armor, and magical
items. Filter by rarity, damage potential, complexity, or attunement requirements.
Automatically uses the database cache through the repository for improved performance.

Examples:
    Basic equipment lookup:
        rare_items = await search_equipment(type="magic-item", rarity="rare")
        light_armor = await search_equipment(type="armor", is_simple=True)

    Using cost ranges (NEW in Phase 3):
        affordable_weapons = await search_equipment(
            type="weapon", cost_max=25
        )
        expensive_items = await search_equipment(
            type="weapon", cost_min=50, cost_max=100
        )

    Using weight and properties (NEW in Phase 3):
        lightweight_weapons = await search_equipment(
            type="weapon", weight_max=3
        )
        finesse_weapons = await search_equipment(
            type="weapon", is_finesse=True
        )
        light_dual_wield_weapons = await search_equipment(
            type="weapon", is_light=True
        )
        magical_weapons = await search_equipment(
            type="weapon", is_magic=True
        )

    Complex equipment queries:
        affordable_simple_weapons = await search_equipment(
            type="weapon", is_simple=True, cost_max=10
        )
        light_finesse_weapons = await search_equipment(
            type="weapon", is_light=True, is_finesse=True, limit=10
        )
        expensive_magical_weapons = await search_equipment(
            type="weapon", is_magic=True, cost_min=100
        )

    Searching all types:
        all_chain_items = await search_equipment(
            type="all", search="chain"
        )

    Semantic search (natural language queries):
        melee_weapons = await search_equipment(
            type="weapon", search="slashing blade for close combat"
        )
        protective_gear = await search_equipment(
            type="armor", search="heavy protective plate"
        )
        magical_storage = await search_equipment(
            type="magic-item", search="bag that holds items"
        )

    Hybrid search (search + filters):
        finesse_slashing = await search_equipment(
            type="weapon", search="elegant blade", is_finesse=True
        )
        rare_magical = await search_equipment(
            type="magic-item", search="fire wand", rarity="rare"
        )

Args:
    type: Equipment type to search. Default "all" searches all types. Options:
        - "weapon": Melee weapons (longsword, dagger, etc.) and ranged weapons (bow, crossbow)
        - "armor": Protective gear (leather armor, chain mail, plate, etc.)
        - "magic-item": Magical items (Bag of Holding, Wand of Fireballs, etc.)
        - "all": Search all equipment types simultaneously (may return many results)
    rarity: Magic item rarity filter (weapon/armor types don't use this).
        Valid values: common, uncommon, rare, very rare, legendary, artifact
        Example: "rare" for high-value magical items
    damage_dice: Weapon damage dice filter to find weapons dealing specific damage.
        Examples: "1d4" (dagger), "1d8" (longsword), "2d6" (greataxe), "1d12" (greatsword)
    is_simple: Filter for simple weapons (True) or martial weapons (False).
        Simple weapons: club, dagger, greatclub, handaxe, javelin, light hammer, mace,
        quarterstaff, sickle, spear
        Martial weapons: all other melee and ranged weapons
        Example: True for low-complexity options
    requires_attunement: Magic item attunement filter. Some powerful items require
        attunement to a character. Examples: "yes", "no", or specific requirements
    cost_min: Minimum cost in gold pieces (weapons and armor). Filters items costing
        at least this amount. Example: 10 for items costing 10+ gp
    cost_max: Maximum cost in gold pieces (weapons and armor). Filters items costing
        at most this amount. Example: 25 for items costing 25 gp or less
    weight_max: Maximum weight in pounds (weapons). Filters weapons weighing at most
        this amount. Example: 3 for lightweight weapons
    is_finesse: Finesse property filter (weapons). When True, returns only weapons
        with the finesse property (can use STR or DEX modifier). Example: True
    is_light: Light property filter (weapons). When True, returns only light weapons
        suitable for dual-wielding. Example: True

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

Returns:
    List of equipment dictionaries. Structure varies by type:

    For type="weapon":
        - name: Weapon name
        - damage_dice: Damage expression (e.g., "1d8")
        - damage_type: Type of damage (slashing, piercing, bludgeoning)
        - weight: Weight in pounds
        - is_simple: Whether this is a simple weapon
        - range: Range for ranged weapons (e.g., "20/60 feet")
        - properties: Weapon properties (finesse, heavy, reach, two-handed, etc.)
        - rarity: Equipment rarity

    For type="armor":
        - name: Armor name
        - armor_class: AC provided by this armor
        - armor_class_dex: Whether DEX bonus applies (light/medium)
        - armor_class_strength: Whether STR requirement applies (heavy)
        - weight: Weight in pounds
        - armor_category: Light/Medium/Heavy classification
        - rarity: Equipment rarity

    For type="magic-item":
        - name: Item name
        - description: What the item does and its powers
        - rarity: Rarity level (common through artifact)
        - requires_attunement: Attunement requirements
        - wondrous: Whether item is wondrous (non-weapon/armor)
        - weight: Weight if applicable
        - armor_class: AC bonus if armor
        - damage: Damage if weapon

Raises:
    ApiError: If the API request fails due to network issues or server errors
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

Semantic search (natural language queries):
 - search_rule(rule_type="condition", search="movement restricted") - Find conditions affecting movement
 - search_rule(rule_type="damage-type", search="burning heat") - Find fire-related damage
 - search_rule(rule_type="skill", search="sneaking hiding") - Find stealth-related skills

Hybrid search (search + filters):
 - search_rule(rule_type="condition", search="cannot see", documents=["srd-5e"]) - Find blindness/vision conditions

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:

For rule_type="rule":
    - name: Rule name/title
    - desc: Full rule description and examples
    - section: Section/chapter this rule belongs to

For rule_type="condition":
    - name: Condition name
    - desc: Effects and duration of this condition

For rule_type="damage-type":
    - name: Damage type name
    - desc: Description of damage type and uses

For rule_type="weapon-property":
    - name: Property name
    - desc: How the property affects weapon use

For rule_type="skill":
    - name: Skill name
    - ability_score: Associated ability (STR, DEX, CON, INT, WIS, CHA)
    - desc: How skill is used and common checks

For rule_type="ability-score":
    - name: Ability name
    - desc: What ability represents and how it's used
    - skills: Related skills

For rule_type="magic-school":
    - name: School name
    - desc: Philosophy and types of spells in this school

For rule_type="language":
    - name: Language name
    - type: Language type (common, exotic, etc.)
    - script: Writing system if any

For rule_type="proficiency":
    - name: Proficiency type
    - class: What type of proficiency (class, background, race)
    - desc: Details about this proficiency type

For rule_type="alignment":
    - name: Alignment
    - desc: Alignment description and common character types

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.

# Typo-tolerant search
search_all(query="firbal")  # Finds "Fireball" despite typo

# Concept-based search
search_all(query="healing magic")  # Finds healing spells

# Type-filtered search
search_all(query="fire", content_types=["Spell"])  # Only spells

# Document-filtered search
search_all(query="fireball", documents=["srd-5e"])
search_all(query="spell", documents=["srd-5e", "tce"])

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

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

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/frap129/lorekeeper-mcp'

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