UNPKG

tarot-mcp-server

Version:

Model Context Protocol server for Rider-Waite tarot card readings

67 lines (66 loc) 1.83 kB
import { TarotCard } from './types.js'; export interface SearchOptions { keyword?: string; suit?: string; arcana?: 'major' | 'minor'; element?: 'fire' | 'water' | 'air' | 'earth'; number?: number; orientation?: 'upright' | 'reversed'; } export interface SearchResult { card: TarotCard; relevanceScore: number; matchedFields: string[]; } /** * Advanced search functionality for the tarot card database */ export declare class TarotCardSearch { private cards; constructor(cards: readonly TarotCard[]); /** * Search cards by various criteria */ search(options: SearchOptions): SearchResult[]; /** * Search by keyword in card meanings, keywords, and symbolism */ searchByKeyword(keyword: string): SearchResult[]; /** * Find cards by suit */ findBySuit(suit: string): TarotCard[]; /** * Find cards by arcana type */ findByArcana(arcana: 'major' | 'minor'): TarotCard[]; /** * Find cards by element */ findByElement(element: 'fire' | 'water' | 'air' | 'earth'): TarotCard[]; /** * Get cards with similar meanings */ findSimilarCards(cardId: string, limit?: number): TarotCard[]; /** * Get random cards with optional filters */ getRandomCards(count?: number, options?: Partial<SearchOptions>): TarotCard[]; private evaluateCard; private calculateSimilarity; /** * Get statistics about the card database */ getStatistics(): { totalCards: number; majorArcana: number; minorArcana: number; suits: Record<string, number>; elements: Record<string, number>; mostCommonKeywords: { keyword: string; count: number; }[]; }; private getMostCommonKeywords; }