@gala-chain/launchpad-mcp-server
Version:
MCP server for Gala Launchpad SDK with 55 tools + 14 slash commands - Production-grade AI agent integration with comprehensive validation, optimized performance, and 80%+ test coverage
92 lines • 2.63 kB
TypeScript
/**
* Tool Registry System
*
* Enhanced tool registration with auto-validation, metadata, and search capabilities.
* Provides runtime validation and developer-friendly tool discovery.
*
* @see Phase 3.1 of refactoring plan
*/
import type { MCPTool } from '../types/mcp.js';
/**
* Tool category metadata
*/
export interface ToolCategory {
name: string;
description: string;
tools: MCPTool[];
count: number;
}
/**
* Tool registry with metadata and search capabilities
*/
export interface ToolRegistry {
tools: MCPTool[];
categories: Map<string, ToolCategory>;
totalCount: number;
expectedCount: number;
isValid: boolean;
errors: string[];
}
/**
* Tool validation result
*/
export interface ToolValidationResult {
isValid: boolean;
errors: string[];
warnings: string[];
}
/**
* Validates a single tool definition
*/
export declare function validateTool(tool: MCPTool): ToolValidationResult;
/**
* Validates all tools in a registry
*/
export declare function validateTools(tools: MCPTool[]): ToolValidationResult;
/**
* Creates a tool registry with metadata and validation
*/
export declare function createToolRegistry(categories: Array<{
name: string;
description: string;
tools: MCPTool[];
}>, expectedCount?: number): ToolRegistry;
/**
* Finds a tool by name
*/
export declare function findTool(registry: ToolRegistry, name: string): MCPTool | undefined;
/**
* Finds tools by category
*/
export declare function findToolsByCategory(registry: ToolRegistry, categoryName: string): MCPTool[];
/**
* Searches tools by name pattern
*/
export declare function searchTools(registry: ToolRegistry, pattern: string): MCPTool[];
/**
* Gets tool statistics by category
*/
export declare function getToolStatistics(registry: ToolRegistry): {
total: number;
byCategory: Record<string, number>;
};
/**
* Logs tool registry statistics
*/
export declare function logToolRegistry(registry: ToolRegistry): void;
/**
* Generates markdown documentation for tool registry
*/
export declare function generateToolDocumentation(registry: ToolRegistry): string;
export declare const toolRegistry: {
createToolRegistry: typeof createToolRegistry;
validateTool: typeof validateTool;
validateTools: typeof validateTools;
findTool: typeof findTool;
findToolsByCategory: typeof findToolsByCategory;
searchTools: typeof searchTools;
getToolStatistics: typeof getToolStatistics;
logToolRegistry: typeof logToolRegistry;
generateToolDocumentation: typeof generateToolDocumentation;
};
//# sourceMappingURL=tool-registry.d.ts.map