UNPKG

mcp-server-anki

Version:

Model Context Protocol (MCP) server enabling AI assistants (Claude, GPT-4, Gemini, etc.) to interact with Anki flashcards through AnkiConnect.

45 lines (44 loc) 1.09 kB
/** * Tool Registry Implementation * Manages registration and lookup of MCP tools */ import { Tool } from '@modelcontextprotocol/sdk/types.js'; import { IToolRegistry, ToolDefinition, ToolCategory, ToolHandler } from './registry.js'; /** * Concrete implementation of the tool registry */ export declare class ToolRegistry implements IToolRegistry { private tools; /** * Register a single tool */ registerTool(name: string, toolDef: ToolDefinition): void; /** * Register a category of tools */ registerCategory(category: ToolCategory): void; /** * Get all registered tools for ListTools */ getAllTools(): Tool[]; /** * Get handler for a specific tool */ getHandler(toolName: string): ToolHandler | undefined; /** * Get all tool names */ getToolNames(): string[]; /** * Check if tool exists */ hasTool(toolName: string): boolean; /** * Get tool count */ getToolCount(): number; /** * Clear all tools (useful for testing) */ clear(): void; }