tarot-mcp-server
Version:
Model Context Protocol server for Rider-Waite tarot card readings
53 lines (52 loc) • 1.66 kB
TypeScript
import { TarotCard, CardOrientation, CardCategory } from './types.js';
/**
* Manages tarot card data and operations.
* Use the static `create()` method to instantiate.
*/
export declare class TarotCardManager {
private static instance;
private readonly cards;
private readonly allCards;
/**
* The constructor is private. Use the static async `create()` method to get an instance.
* @param cards - The array of tarot cards loaded from the data source.
*/
private constructor();
/**
* Asynchronously creates and initializes a TarotCardManager instance.
* This is the correct way to instantiate the class. It follows the singleton pattern.
*/
static create(): Promise<TarotCardManager>;
/**
* Populates the internal map for quick card lookups.
*/
private initializeCards;
/**
* Get detailed information about a specific card.
*/
getCardInfo(cardName: string, orientation?: CardOrientation): string;
/**
* List all available cards, optionally filtered by category.
*/
listAllCards(category?: CardCategory): string;
/**
* Find a card by name or ID (case-insensitive).
*/
findCard(identifier: string): TarotCard | undefined;
/**
* Fisher-Yates shuffle algorithm for true randomness.
*/
private fisherYatesShuffle;
/**
* Get a random card from the deck.
*/
getRandomCard(): TarotCard;
/**
* Get multiple random cards (without replacement).
*/
getRandomCards(count: number): TarotCard[];
/**
* Get all cards in the deck.
*/
getAllCards(): readonly TarotCard[];
}