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

202 lines 8.88 kB
"use strict"; /** * MCP Tool Name Constants * * Centralized constants for all Gala Launchpad MCP tool names. * Use these constants instead of hardcoded strings to prevent typos * and enable IDE autocomplete. * * Total: 103 tools across 10 categories (includes 2 event watchers: DEX pools and launchpad tokens) */ Object.defineProperty(exports, "__esModule", { value: true }); exports.MCP_TOOLS = exports.BRIDGE_TOOLS = exports.LIQUIDITY_TOOLS = exports.DEX_TOOLS = exports.UTILITY_TOOLS = exports.LOCK_TOOLS = exports.TRANSFER_TOOLS = exports.CREATION_TOOLS = exports.BALANCE_TOOLS = exports.TRADING_TOOLS = exports.POOL_TOOLS = void 0; exports.getAllToolNames = getAllToolNames; exports.isValidToolName = isValidToolName; /** * Pool Management, Pricing & Event Watchers (19 tools) */ exports.POOL_TOOLS = { FETCH_POOLS: 'gala_launchpad_fetch_pools', FETCH_ALL_POOLS: 'gala_launchpad_fetch_all_pools', FETCH_POOL_DETAILS: 'gala_launchpad_fetch_pool_details', FETCH_POOL_DETAILS_FOR_CALCULATION: 'gala_launchpad_fetch_pool_details_for_calculation', FETCH_TOKEN_DETAILS: 'gala_launchpad_fetch_token_details', FETCH_TOKEN_DISTRIBUTION: 'gala_launchpad_fetch_token_distribution', FETCH_TOKEN_BADGES: 'gala_launchpad_fetch_token_badges', FETCH_VOLUME_DATA: 'gala_launchpad_fetch_volume_data', FETCH_GALA_SPOT_PRICE: 'gala_launchpad_fetch_gala_spot_price', FETCH_TOKEN_SPOT_PRICE: 'gala_launchpad_fetch_token_spot_price', FETCH_LAUNCHPAD_TOKEN_SPOT_PRICE: 'gala_launchpad_fetch_launchpad_token_spot_price', FETCH_PRICE_HISTORY: 'gala_launchpad_fetch_price_history', FETCH_ALL_PRICE_HISTORY: 'gala_launchpad_fetch_all_price_history', CHECK_TOKEN_NAME: 'gala_launchpad_check_token_name', CHECK_TOKEN_SYMBOL: 'gala_launchpad_check_token_symbol', RESOLVE_VAULT_ADDRESS: 'gala_launchpad_resolve_vault_address', RESOLVE_TOKEN_CLASS_KEY: 'gala_launchpad_resolve_token_class_key', ON_DEX_POOL_CREATION: 'gala_launchpad_on_dex_pool_creation', ON_LAUNCHPAD_TOKEN_CREATION: 'gala_launchpad_on_launchpad_token_creation', }; /** * Trading Operations Tools (13 tools) */ exports.TRADING_TOOLS = { CALCULATE_BUY_AMOUNT: 'gala_launchpad_calculate_buy_amount', CALCULATE_BUY_AMOUNT_LOCAL: 'gala_launchpad_calculate_buy_amount_local', CALCULATE_BUY_AMOUNT_EXTERNAL: 'gala_launchpad_calculate_buy_amount_external', CALCULATE_SELL_AMOUNT: 'gala_launchpad_calculate_sell_amount', CALCULATE_SELL_AMOUNT_LOCAL: 'gala_launchpad_calculate_sell_amount_local', CALCULATE_SELL_AMOUNT_EXTERNAL: 'gala_launchpad_calculate_sell_amount_external', CALCULATE_BUY_AMOUNT_FOR_GRADUATION: 'gala_launchpad_calculate_buy_amount_for_graduation', BUY_TOKENS: 'gala_launchpad_buy_tokens', SELL_TOKENS: 'gala_launchpad_sell_tokens', GRADUATE_TOKEN: 'gala_launchpad_graduate_token', FETCH_TRADES: 'gala_launchpad_fetch_trades', GET_BUNDLER_TRANSACTION_RESULT: 'gala_launchpad_get_bundler_transaction_result', IS_TOKEN_GRADUATED: 'gala_launchpad_is_token_graduated', }; /** * Balance & Portfolio Tools (7 tools) */ exports.BALANCE_TOOLS = { FETCH_GALA_BALANCE: 'gala_launchpad_fetch_gala_balance', FETCH_TOKEN_BALANCE: 'gala_launchpad_fetch_token_balance', FETCH_LOCKED_TOKENS: 'gala_launchpad_fetch_locked_tokens', FETCH_TOKENS_HELD: 'gala_launchpad_fetch_tokens_held', FETCH_TOKENS_CREATED: 'gala_launchpad_fetch_tokens_created', FETCH_PROFILE: 'gala_launchpad_fetch_profile', UPDATE_PROFILE: 'gala_launchpad_update_profile', }; /** * Token Creation Tools (5 tools) */ exports.CREATION_TOOLS = { LAUNCH_TOKEN: 'gala_launchpad_launch_token', UPLOAD_TOKEN_IMAGE: 'gala_launchpad_upload_token_image', UPLOAD_PROFILE_IMAGE: 'gala_launchpad_upload_profile_image', FETCH_LAUNCH_TOKEN_FEE: 'gala_launchpad_fetch_launch_token_fee', CALCULATE_INITIAL_BUY: 'gala_launchpad_calculate_initial_buy', }; /** * Token Transfer Tools (2 tools) */ exports.TRANSFER_TOOLS = { TRANSFER_GALA: 'gala_launchpad_transfer_gala', TRANSFER_TOKEN: 'gala_launchpad_transfer_token', }; /** * Token Lock/Unlock Tools (2 tools) */ exports.LOCK_TOOLS = { LOCK_TOKEN: 'gala_launchpad_lock_token', UNLOCK_TOKEN: 'gala_launchpad_unlock_token', }; /** * Utility Tools (14 tools) */ exports.UTILITY_TOOLS = { CREATE_WALLET: 'gala_launchpad_create_wallet', GET_ADDRESS: 'gala_launchpad_get_address', GET_ETHEREUM_ADDRESS: 'gala_launchpad_get_ethereum_address', GET_CONFIG: 'gala_launchpad_get_config', GET_URL_BY_TOKEN_NAME: 'gala_launchpad_get_url_by_token_name', EXPLAIN_SDK_USAGE: 'gala_launchpad_explain_sdk_usage', GET_CACHE_INFO: 'gala_launchpad_get_cache_info', CLEAR_CACHE: 'gala_launchpad_clear_cache', HAS_WALLET: 'gala_launchpad_has_wallet', GET_WALLET: 'gala_launchpad_get_wallet', SET_WALLET: 'gala_launchpad_set_wallet', GET_ENVIRONMENT: 'gala_launchpad_get_environment', SWITCH_ENVIRONMENT: 'gala_launchpad_switch_environment', GET_VERSION: 'gala_launchpad_get_version', }; /** * DEX Trading & Pool Discovery Tools (12 tools) */ exports.DEX_TOOLS = { FETCH_DEX_POOLS: 'gala_launchpad_fetch_dex_pools', FETCH_ALL_DEX_POOLS: 'gala_launchpad_fetch_all_dex_pools', FETCH_DEX_AGGREGATED_VOLUME_SUMMARY: 'gala_launchpad_fetch_dex_aggregated_volume_summary', FETCH_ALL_DEX_SEASONS: 'gala_launchpad_fetch_all_dex_seasons', FETCH_CURRENT_DEX_SEASON: 'gala_launchpad_fetch_current_dex_season', FETCH_DEX_LEADERBOARD_BY_SEASON_ID: 'gala_launchpad_fetch_dex_leaderboard_by_season_id', FETCH_CURRENT_DEX_LEADERBOARD: 'gala_launchpad_fetch_current_dex_leaderboard', GET_SWAP_QUOTE_EXACT_INPUT: 'gala_launchpad_get_swap_quote_exact_input', GET_SWAP_QUOTE_EXACT_OUTPUT: 'gala_launchpad_get_swap_quote_exact_output', EXECUTE_SWAP: 'gala_launchpad_execute_swap', GET_SWAP_USER_ASSETS: 'gala_launchpad_get_swap_user_assets', GET_SWAP_POOL_INFO: 'gala_launchpad_get_swap_pool_info', }; /** * Liquidity Position Management Tools (10 tools) */ exports.LIQUIDITY_TOOLS = { GET_USER_LIQUIDITY_POSITIONS: 'gala_launchpad_get_user_liquidity_positions', GET_ALL_USER_LIQUIDITY_POSITIONS: 'gala_launchpad_get_all_user_liquidity_positions', GET_LIQUIDITY_POSITION_BY_ID: 'gala_launchpad_get_liquidity_position_by_id', GET_LIQUIDITY_POSITION: 'gala_launchpad_get_liquidity_position', FETCH_SWAP_POSITION_DIRECT: 'gala_launchpad_fetch_swap_position_direct', ESTIMATE_REMOVE_LIQUIDITY: 'gala_launchpad_estimate_remove_liquidity', ADD_LIQUIDITY_BY_PRICE: 'gala_launchpad_add_liquidity_by_price', ADD_LIQUIDITY_BY_TICKS: 'gala_launchpad_add_liquidity_by_ticks', REMOVE_LIQUIDITY: 'gala_launchpad_remove_liquidity', COLLECT_POSITION_FEES: 'gala_launchpad_collect_position_fees', }; /** * Bridge Tools (11 tools) */ exports.BRIDGE_TOOLS = { ESTIMATE_BRIDGE_FEE: 'gala_launchpad_estimate_bridge_fee', BRIDGE_OUT: 'gala_launchpad_bridge_out', BRIDGE_IN: 'gala_launchpad_bridge_in', GET_BRIDGE_STATUS: 'gala_launchpad_get_bridge_status', GET_SUPPORTED_BRIDGE_TOKENS: 'gala_launchpad_get_supported_bridge_tokens', // Single token balance queries (fast - 1 RPC call) FETCH_ETHEREUM_WALLET_TOKEN_BALANCE: 'gala_launchpad_fetch_ethereum_wallet_token_balance', FETCH_ETHEREUM_WALLET_NATIVE_BALANCE: 'gala_launchpad_fetch_ethereum_wallet_native_balance', FETCH_SOLANA_WALLET_TOKEN_BALANCE: 'gala_launchpad_fetch_solana_wallet_token_balance', FETCH_SOLANA_WALLET_NATIVE_BALANCE: 'gala_launchpad_fetch_solana_wallet_native_balance', // All tokens balance queries (complete portfolio view) FETCH_ETHEREUM_WALLET_ALL_BALANCES: 'gala_launchpad_fetch_ethereum_wallet_all_balances', FETCH_SOLANA_WALLET_ALL_BALANCES: 'gala_launchpad_fetch_solana_wallet_all_balances', }; /** * All MCP Tools - Flat structure for easy access * * Use specific category constants above for better organization, * or use this flat object for backwards compatibility. */ exports.MCP_TOOLS = { // Pool Management & Pricing ...exports.POOL_TOOLS, // Trading Operations ...exports.TRADING_TOOLS, // Balance & Portfolio ...exports.BALANCE_TOOLS, // Token Creation ...exports.CREATION_TOOLS, // Token Transfers ...exports.TRANSFER_TOOLS, // Token Locks ...exports.LOCK_TOOLS, // Utilities ...exports.UTILITY_TOOLS, // DEX Trading ...exports.DEX_TOOLS, // Liquidity Positions ...exports.LIQUIDITY_TOOLS, // Bridge ...exports.BRIDGE_TOOLS, }; /** * Get all tool names as an array */ function getAllToolNames() { return Object.values(exports.MCP_TOOLS); } /** * Check if a string is a valid MCP tool name */ function isValidToolName(name) { return getAllToolNames().includes(name); } //# sourceMappingURL=mcpToolNames.js.map