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

37 lines 1.67 kB
"use strict"; /** * Clear Cache Tool * * Clears token caches (all caches or specific launchpad token). * When clearing all (no tokenName), also clears bridgeable token cache. * Useful for testing or forcing fresh fetches of token data. */ Object.defineProperty(exports, "__esModule", { value: true }); exports.clearCacheTool = void 0; const error_handler_js_1 = require("../../utils/error-handler.js"); const response_formatter_js_1 = require("../../utils/response-formatter.js"); const common_schemas_js_1 = require("../../schemas/common-schemas.js"); exports.clearCacheTool = { name: 'gala_launchpad_clear_cache', description: 'Clear token caches. With tokenName: clears that launchpad token. Without tokenName: clears ALL caches (launchpad metadata + bridgeable tokens). Caches auto-warm from fetchPools/fetchBridgeableTokens calls.', inputSchema: { type: 'object', properties: { tokenName: { ...common_schemas_js_1.TOKEN_NAME_SCHEMA, description: 'Optional launchpad token name to clear (clears ALL caches including bridgeable tokens if not provided)', }, }, }, handler: (0, error_handler_js_1.withErrorHandling)(async (sdk, args) => { const tokenName = args?.tokenName; sdk.clearCache(tokenName); return (0, response_formatter_js_1.formatSuccess)({ message: tokenName ? `Cache cleared for launchpad token: ${tokenName}` : 'All caches cleared (launchpad metadata + bridgeable tokens)', tokenName: tokenName || null, }); }), }; //# sourceMappingURL=clearCache.js.map