UNPKG

@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

96 lines 3.16 kB
/** * Error Message Templates * * Centralized error messages with AI-friendly tips for common error patterns. * Eliminates duplication and ensures consistent error messaging. * * @see Phase 3.3 of refactoring plan */ /** * Error template with AI-friendly tip */ export interface ErrorTemplate { pattern: RegExp | string; tip: string; category: 'validation' | 'timeout' | 'format' | 'business-logic' | 'network'; } /** * Limit validation errors */ export declare const LIMIT_ERRORS: { readonly trade: { readonly pattern: RegExp; readonly tip: "💡 AI TIP: Trade and user operations have a maximum limit of 20. Use:\n- gala_launchpad_fetch_trades: limit ≤ 20\n- gala_launchpad_fetch_tokens_held: limit ≤ 20\n- gala_launchpad_fetch_tokens_created: limit ≤ 20\n\nSee docs/CONSTRAINTS-REFERENCE.md for details."; readonly category: "validation"; }; readonly comment: { readonly pattern: RegExp; readonly tip: "💡 AI TIP: Comment operations have a maximum limit of 50. Use:\n- gala_launchpad_fetch_comments: limit ≤ 50\n\nSee docs/CONSTRAINTS-REFERENCE.md for details."; readonly category: "validation"; }; readonly pool: { readonly pattern: RegExp; readonly tip: "💡 AI TIP: Pool operations have a maximum limit of 100. Use:\n- gala_launchpad_fetch_pools: limit ≤ 100\n\nSee docs/CONSTRAINTS-REFERENCE.md for details."; readonly category: "validation"; }; }; /** * Token name validation errors */ export declare const TOKEN_NAME_ERROR: ErrorTemplate; /** * Token symbol validation errors */ export declare const TOKEN_SYMBOL_ERROR: ErrorTemplate; /** * Wallet address format errors */ export declare const ADDRESS_FORMAT_ERROR: ErrorTemplate; /** * WebSocket/trade timeout errors */ export declare const TRADE_TIMEOUT_ERROR: ErrorTemplate; /** * Slippage/amount errors */ export declare const SLIPPAGE_ERROR: ErrorTemplate; /** * Type parameter confusion */ export declare const TRADE_TYPE_ERROR: ErrorTemplate; /** * Social URL requirement errors */ export declare const SOCIAL_URL_ERROR: ErrorTemplate; /** * Generic validation error */ export declare const GENERIC_VALIDATION_ERROR: ErrorTemplate; /** * All error templates in priority order (checked sequentially) */ export declare const ERROR_TEMPLATES: ErrorTemplate[]; /** * Finds the best matching error template for a message */ export declare function findErrorTemplate(message: string): ErrorTemplate | null; /** * Gets the AI-friendly tip for an error message */ export declare function getErrorTip(message: string): string | null; /** * Applies AI-friendly tip to error message */ export declare function enhanceErrorMessage(message: string): string; /** * Gets error category for an error message */ export declare function getErrorCategory(message: string): string; export declare const errorTemplates: { templates: ErrorTemplate[]; findTemplate: typeof findErrorTemplate; getTip: typeof getErrorTip; enhance: typeof enhanceErrorMessage; getCategory: typeof getErrorCategory; }; //# sourceMappingURL=error-templates.d.ts.map