UNPKG

@gala-chain/launchpad-mcp-server

Version:

MCP server for Gala Launchpad - 102 tools (pool management, event watchers, GSwap DEX trading, price history, token creation, wallet management, DEX pool discovery, liquidity positions, token locks, locked token queries, composite pool data, cross-chain b

136 lines (132 loc) 4.77 kB
"use strict"; /** * Token Discovery Prompts * * Slash commands for discovering and researching tokens on Gala Launchpad */ Object.defineProperty(exports, "__esModule", { value: true }); exports.discoveryPrompts = exports.fetchAvailableDexTokensPrompt = exports.discoverTokensPrompt = void 0; const workflowTemplates_js_1 = require("./utils/workflowTemplates.js"); const validation_js_1 = require("../utils/validation.js"); /** * Discover Tokens - Token discovery and exploration workflow */ exports.discoverTokensPrompt = { name: 'galachain-launchpad:discover-tokens', description: 'Discover new opportunities on Gala Launchpad - find recently launched tokens, popular tokens, or tokens near graduation', arguments: [ { name: 'type', description: 'Type of discovery - "recent" for newly launched tokens (default), "popular" for most traded tokens, or "near-graduation" for tokens close to completing their bonding curve', required: false, }, { name: 'limit', description: 'Number of tokens to show (default: 10, max: 50)', required: false, }, { name: 'minProgress', description: 'Minimum graduation progress percentage - only for "near-graduation" type (e.g., "85" for 85%+ progress)', required: false, }, { name: 'maxPrice', description: 'Maximum USD price for tokens (e.g., "1.50" to find tokens under $1.50) - useful for finding low-cost tokens to accumulate', required: false, }, ], handler: (args) => { // Parse and validate inputs const type = (args.type || 'recent'); const limit = Math.min(Math.max(1, parseInt(args.limit || '10', 10)), 50); // Validate type if (!['recent', 'popular', 'near-graduation'].includes(type)) { throw new Error('Type must be "recent", "popular", or "near-graduation"'); } // Validate minProgress if provided if (args.minProgress) { const progress = parseInt(args.minProgress, 10); if (isNaN(progress) || progress < 0 || progress > 100) { throw new Error('minProgress must be a number between 0 and 100'); } } // Validate maxPrice if provided if (args.maxPrice) { (0, validation_js_1.validateNumericAmount)(args.maxPrice, 'maxPrice'); } return [ { role: 'user', content: { type: 'text', text: (0, workflowTemplates_js_1.createDiscoverTokensWorkflow)({ type, limit, minProgress: args.minProgress, maxPrice: args.maxPrice, }), }, }, ]; }, }; /** * Fetch Available DEX Tokens - Discover tokens on the DEX * * This prompt helps users discover what tokens are available for trading on the DEX. */ exports.fetchAvailableDexTokensPrompt = { name: 'galachain-launchpad:fetch-available-dex-tokens', description: 'Discover all tokens available for trading on the DEX with rich metadata', arguments: [ { name: 'search', description: 'Optional search filter to find specific tokens', required: false, }, { name: 'all', description: 'Set to "true" to fetch ALL tokens with auto-pagination', required: false, }, ], handler: (args) => { const fetchAll = args.all === 'true'; const hasSearch = !!args.search; return [ { role: 'user', content: { type: 'text', text: `Discover tokens available for trading on the DEX. ${fetchAll ? `**Fetching ALL tokens (auto-paginated)** Use: gala_launchpad_fetch_all_available_dex_tokens` : `**Fetching first page** Use: gala_launchpad_fetch_available_dex_tokens`} ${hasSearch ? `**Search filter:** "${args.search}"` : '**No search filter** - showing all tokens.'} **Returns for each token:** - Symbol and name - Description - Image URL - Decimals - Verified status This is useful for: - Discovering new trading opportunities - Finding specific tokens by name - Building token selection UIs - Comprehensive token catalogs`, }, }, ]; }, }; /** * Export all discovery prompts */ exports.discoveryPrompts = [ exports.discoverTokensPrompt, exports.fetchAvailableDexTokensPrompt, ]; //# sourceMappingURL=discover-tokens.js.map