/** * Tool name shortening strategies * * Why: MCP tool names combined with server name must stay under limits. * Different strategies offer trade-offs between readability and compactness. */ export declare enum NamingStrategy { None = "none", Balanced = "balanced", Iterative = "iterative", Hash = "hash", Auto = "auto" } export interface OperationForNaming { operationId: string; method: string; path: string; tags?: string[]; } export interface ShortenResult { name: string; truncated: boolean; strategy: NamingStrategy; originalLength: number; partsUsed?: number; } export interface SimilarPair { opA: OperationForNaming; opB: OperationForNaming; similarity: number; } export interface ShorteningOptions { maxLength: number; minParts?: number; minLength?: number; allOperations?: OperationForNaming[]; } /** * Shorten tool name using specified strategy */ export declare function shortenToolName(op: OperationForNaming, strategy: NamingStrategy, maxLength: number, allOperations?: OperationForNaming[], options?: Partial): ShortenResult; /** * Generate stable short hash from string */ export declare function stableHash(str: string, length?: number): string; /** * Calculate Levenshtein distance between two strings */ export declare function levenshteinDistance(a: string, b: string): number; /** * Pick most similar pairs of operations */ export declare function pickMostSimilarPairs(operations: OperationForNaming[], topN: number, threshold?: number): SimilarPair[]; /** * Detect potential collisions when shortening multiple operations */ export declare function detectCollisions(operations: OperationForNaming[], strategy: NamingStrategy, maxLength: number, options?: Partial): Map; //# sourceMappingURL=naming.d.ts.map