@gala-chain/launchpad-mcp-server 1.5.1 → 1.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/tools/index.d.ts +1 -1
- package/dist/tools/index.js +2 -2
- package/dist/tools/utils/clearCache.d.ts +9 -0
- package/dist/tools/utils/clearCache.d.ts.map +1 -0
- package/dist/tools/utils/clearCache.js +36 -0
- package/dist/tools/utils/clearCache.js.map +1 -0
- package/dist/tools/utils/getCacheInfo.d.ts +8 -0
- package/dist/tools/utils/getCacheInfo.d.ts.map +1 -0
- package/dist/tools/utils/getCacheInfo.js +16 -0
- package/dist/tools/utils/getCacheInfo.js.map +1 -0
- package/dist/tools/utils/index.d.ts.map +1 -1
- package/dist/tools/utils/index.js +4 -0
- package/dist/tools/utils/index.js.map +1 -1
- package/package.json +2 -2
package/dist/tools/index.d.ts
CHANGED
package/dist/tools/index.js
CHANGED
|
@@ -58,9 +58,9 @@ const toolCategories = [
|
|
|
58
58
|
},
|
|
59
59
|
];
|
|
60
60
|
/**
|
|
61
|
-
* Enhanced tool registry with validation (
|
|
61
|
+
* Enhanced tool registry with validation (49 tools)
|
|
62
62
|
*/
|
|
63
|
-
exports.registry = (0, tool_registry_js_1.createToolRegistry)(toolCategories,
|
|
63
|
+
exports.registry = (0, tool_registry_js_1.createToolRegistry)(toolCategories, 49);
|
|
64
64
|
/**
|
|
65
65
|
* Complete tool array (for backward compatibility)
|
|
66
66
|
*/
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Clear Cache Tool
|
|
3
|
+
*
|
|
4
|
+
* Clears token metadata cache (all tokens or specific token).
|
|
5
|
+
* Useful for testing or forcing fresh fetches of token data.
|
|
6
|
+
*/
|
|
7
|
+
import type { MCPTool } from '../../types/mcp.js';
|
|
8
|
+
export declare const clearCacheTool: MCPTool;
|
|
9
|
+
//# sourceMappingURL=clearCache.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"clearCache.d.ts","sourceRoot":"","sources":["../../../src/tools/utils/clearCache.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAKH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAElD,eAAO,MAAM,cAAc,EAAE,OAuB5B,CAAC"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Clear Cache Tool
|
|
4
|
+
*
|
|
5
|
+
* Clears token metadata cache (all tokens or specific token).
|
|
6
|
+
* Useful for testing or forcing fresh fetches of token data.
|
|
7
|
+
*/
|
|
8
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
+
exports.clearCacheTool = void 0;
|
|
10
|
+
const error_handler_js_1 = require("../../utils/error-handler.js");
|
|
11
|
+
const response_formatter_js_1 = require("../../utils/response-formatter.js");
|
|
12
|
+
const common_schemas_js_1 = require("../../schemas/common-schemas.js");
|
|
13
|
+
exports.clearCacheTool = {
|
|
14
|
+
name: 'gala_launchpad_clear_cache',
|
|
15
|
+
description: 'Clear token metadata cache. Can clear a specific token or the entire cache. The cache automatically warms from fetchPools calls.',
|
|
16
|
+
inputSchema: {
|
|
17
|
+
type: 'object',
|
|
18
|
+
properties: {
|
|
19
|
+
tokenName: {
|
|
20
|
+
...common_schemas_js_1.TOKEN_NAME_SCHEMA,
|
|
21
|
+
description: 'Optional token name to clear (clears all if not provided)',
|
|
22
|
+
},
|
|
23
|
+
},
|
|
24
|
+
},
|
|
25
|
+
handler: (0, error_handler_js_1.withErrorHandling)(async (sdk, args) => {
|
|
26
|
+
const tokenName = args?.tokenName;
|
|
27
|
+
sdk.clearCache(tokenName);
|
|
28
|
+
return (0, response_formatter_js_1.formatSuccess)({
|
|
29
|
+
message: tokenName
|
|
30
|
+
? `Cache cleared for token: ${tokenName}`
|
|
31
|
+
: 'Cache cleared for all tokens',
|
|
32
|
+
tokenName: tokenName || null,
|
|
33
|
+
});
|
|
34
|
+
}),
|
|
35
|
+
};
|
|
36
|
+
//# sourceMappingURL=clearCache.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"clearCache.js","sourceRoot":"","sources":["../../../src/tools/utils/clearCache.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAEH,mEAAiE;AACjE,6EAAkE;AAClE,uEAAoE;AAGvD,QAAA,cAAc,GAAY;IACrC,IAAI,EAAE,4BAA4B;IAClC,WAAW,EAAE,kIAAkI;IAC/I,WAAW,EAAE;QACX,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE;YACV,SAAS,EAAE;gBACT,GAAG,qCAAiB;gBACpB,WAAW,EAAE,2DAA2D;aACzE;SACF;KACF;IACD,OAAO,EAAE,IAAA,oCAAiB,EAAC,KAAK,EAAE,GAAG,EAAE,IAAI,EAAE,EAAE;QAC7C,MAAM,SAAS,GAAG,IAAI,EAAE,SAAS,CAAC;QAClC,GAAG,CAAC,UAAU,CAAC,SAAS,CAAC,CAAC;QAE1B,OAAO,IAAA,qCAAa,EAAC;YACnB,OAAO,EAAE,SAAS;gBAChB,CAAC,CAAC,4BAA4B,SAAS,EAAE;gBACzC,CAAC,CAAC,8BAA8B;YAClC,SAAS,EAAE,SAAS,IAAI,IAAI;SAC7B,CAAC,CAAC;IACL,CAAC,CAAC;CACH,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Get Cache Info Tool
|
|
3
|
+
*
|
|
4
|
+
* Returns statistics about the token metadata cache for monitoring and debugging.
|
|
5
|
+
* The cache persists entire MCP server lifetime and accumulates metadata across conversations.
|
|
6
|
+
*/
|
|
7
|
+
export declare const getCacheInfoTool: import("../../types/mcp.js").MCPTool;
|
|
8
|
+
//# sourceMappingURL=getCacheInfo.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getCacheInfo.d.ts","sourceRoot":"","sources":["../../../src/tools/utils/getCacheInfo.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,eAAO,MAAM,gBAAgB,sCAI3B,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Get Cache Info Tool
|
|
4
|
+
*
|
|
5
|
+
* Returns statistics about the token metadata cache for monitoring and debugging.
|
|
6
|
+
* The cache persists entire MCP server lifetime and accumulates metadata across conversations.
|
|
7
|
+
*/
|
|
8
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
+
exports.getCacheInfoTool = void 0;
|
|
10
|
+
const tool_factory_js_1 = require("../../utils/tool-factory.js");
|
|
11
|
+
exports.getCacheInfoTool = (0, tool_factory_js_1.createNoParamTool)({
|
|
12
|
+
name: 'gala_launchpad_get_cache_info',
|
|
13
|
+
description: 'Get token metadata cache statistics including total tokens cached, cache size in bytes, and timestamp of oldest entry. The cache persists for the entire MCP server lifetime.',
|
|
14
|
+
handler: (sdk) => sdk.getCacheInfo(),
|
|
15
|
+
});
|
|
16
|
+
//# sourceMappingURL=getCacheInfo.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getCacheInfo.js","sourceRoot":"","sources":["../../../src/tools/utils/getCacheInfo.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAEH,iEAAgE;AAEnD,QAAA,gBAAgB,GAAG,IAAA,mCAAiB,EAAC;IAChD,IAAI,EAAE,+BAA+B;IACrC,WAAW,EAAE,+KAA+K;IAC5L,OAAO,EAAE,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,YAAY,EAAE;CACrC,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/tools/utils/index.ts"],"names":[],"mappings":"AAAA;;GAEG;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/tools/utils/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAYH,eAAO,MAAM,YAAY,wCAUxB,CAAC"}
|
|
@@ -11,6 +11,8 @@ const getConfig_js_1 = require("./getConfig.js");
|
|
|
11
11
|
const getUrlByTokenName_js_1 = require("./getUrlByTokenName.js");
|
|
12
12
|
const explainSdkUsage_js_1 = require("./explainSdkUsage.js");
|
|
13
13
|
const isTokenGraduated_js_1 = require("./isTokenGraduated.js");
|
|
14
|
+
const getCacheInfo_js_1 = require("./getCacheInfo.js");
|
|
15
|
+
const clearCache_js_1 = require("./clearCache.js");
|
|
14
16
|
exports.utilityTools = [
|
|
15
17
|
createWallet_js_1.createWalletTool,
|
|
16
18
|
getAddress_js_1.getAddressTool,
|
|
@@ -19,5 +21,7 @@ exports.utilityTools = [
|
|
|
19
21
|
getUrlByTokenName_js_1.getUrlByTokenNameTool,
|
|
20
22
|
explainSdkUsage_js_1.explainSdkUsageTool,
|
|
21
23
|
isTokenGraduated_js_1.isTokenGraduatedTool,
|
|
24
|
+
getCacheInfo_js_1.getCacheInfoTool,
|
|
25
|
+
clearCache_js_1.clearCacheTool,
|
|
22
26
|
];
|
|
23
27
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/tools/utils/index.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAEH,uDAAqD;AACrD,mDAAiD;AACjD,mEAAiE;AACjE,iDAA+C;AAC/C,iEAA+D;AAC/D,6DAA2D;AAC3D,+DAA6D;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/tools/utils/index.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAEH,uDAAqD;AACrD,mDAAiD;AACjD,mEAAiE;AACjE,iDAA+C;AAC/C,iEAA+D;AAC/D,6DAA2D;AAC3D,+DAA6D;AAC7D,uDAAqD;AACrD,mDAAiD;AAEpC,QAAA,YAAY,GAAG;IAC1B,kCAAgB;IAChB,8BAAc;IACd,8CAAsB;IACtB,4BAAa;IACb,4CAAqB;IACrB,wCAAmB;IACnB,0CAAoB;IACpB,kCAAgB;IAChB,8BAAc;CACf,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gala-chain/launchpad-mcp-server",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.6.0",
|
|
4
4
|
"description": "MCP server for Gala Launchpad SDK with 47 tools + 14 slash commands - Production-grade AI agent integration with comprehensive validation, optimized performance, and 80%+ test coverage",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"bin": {
|
|
@@ -62,7 +62,7 @@
|
|
|
62
62
|
"dependencies": {
|
|
63
63
|
"@gala-chain/api": "^2.4.3",
|
|
64
64
|
"@gala-chain/connect": "^2.4.3",
|
|
65
|
-
"@gala-chain/launchpad-sdk": "^3.
|
|
65
|
+
"@gala-chain/launchpad-sdk": "^3.10.0",
|
|
66
66
|
"@modelcontextprotocol/sdk": "^0.5.0",
|
|
67
67
|
"axios": "^1.12.2",
|
|
68
68
|
"bignumber.js": "^9.1.2",
|