@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
36 lines • 1.43 kB
JavaScript
;
/**
* Clear Cache Tool
*
* Clears token metadata cache (all tokens or specific token).
* 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 metadata cache. Can clear a specific token or the entire cache. The cache automatically warms from fetchPools calls.',
inputSchema: {
type: 'object',
properties: {
tokenName: {
...common_schemas_js_1.TOKEN_NAME_SCHEMA,
description: 'Optional token name to clear (clears all 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 token: ${tokenName}`
: 'Cache cleared for all tokens',
tokenName: tokenName || null,
});
}),
};
//# sourceMappingURL=clearCache.js.map