@gala-chain/launchpad-mcp-server 1.8.1 → 1.8.2

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.
Files changed (64) hide show
  1. package/CHANGELOG.md +19 -0
  2. package/dist/generated/version.d.ts +1 -1
  3. package/dist/generated/version.js +1 -1
  4. package/dist/prompts/index.d.ts +4 -3
  5. package/dist/prompts/index.d.ts.map +1 -1
  6. package/dist/prompts/index.js +7 -2
  7. package/dist/prompts/index.js.map +1 -1
  8. package/dist/prompts/utility.d.ts +18 -0
  9. package/dist/prompts/utility.d.ts.map +1 -0
  10. package/dist/prompts/utility.js +43 -0
  11. package/dist/prompts/utility.js.map +1 -0
  12. package/package.json +2 -2
  13. package/docs/AI-AGENT-PATTERNS.md +0 -555
  14. package/docs/CONSTRAINTS-REFERENCE.md +0 -454
  15. package/docs/PROMPT-TOOL-MAPPING.md +0 -352
  16. package/docs/examples/default-values-pattern.md +0 -240
  17. package/docs/examples/tool-factory-pattern.md +0 -217
  18. package/jest.config.js +0 -94
  19. package/src/__tests__/integration/poolTools.integration.test.ts +0 -185
  20. package/src/constants/mcpToolNames.ts +0 -141
  21. package/src/index.ts +0 -19
  22. package/src/prompts/__tests__/promptStructure.test.ts +0 -114
  23. package/src/prompts/__tests__/registry.test.ts +0 -143
  24. package/src/prompts/analysis.ts +0 -429
  25. package/src/prompts/index.ts +0 -123
  26. package/src/prompts/portfolio.ts +0 -242
  27. package/src/prompts/trading.ts +0 -191
  28. package/src/prompts/utils/workflowTemplates.ts +0 -344
  29. package/src/schemas/common-schemas.ts +0 -392
  30. package/src/scripts/test-all-prompts.ts +0 -184
  31. package/src/server.ts +0 -241
  32. package/src/tools/balance/index.ts +0 -174
  33. package/src/tools/creation/index.ts +0 -182
  34. package/src/tools/index.ts +0 -80
  35. package/src/tools/pools/fetchAllPools.ts +0 -47
  36. package/src/tools/pools/fetchPoolDetails.ts +0 -27
  37. package/src/tools/pools/fetchPoolDetailsForCalculation.ts +0 -22
  38. package/src/tools/pools/fetchPools.ts +0 -47
  39. package/src/tools/pools/index.ts +0 -240
  40. package/src/tools/social/index.ts +0 -64
  41. package/src/tools/trading/index.ts +0 -605
  42. package/src/tools/transfers/index.ts +0 -75
  43. package/src/tools/utils/clearCache.ts +0 -36
  44. package/src/tools/utils/createWallet.ts +0 -19
  45. package/src/tools/utils/explainSdkUsage.ts +0 -853
  46. package/src/tools/utils/getAddress.ts +0 -12
  47. package/src/tools/utils/getCacheInfo.ts +0 -14
  48. package/src/tools/utils/getConfig.ts +0 -11
  49. package/src/tools/utils/getEthereumAddress.ts +0 -12
  50. package/src/tools/utils/getUrlByTokenName.ts +0 -12
  51. package/src/tools/utils/getVersion.ts +0 -25
  52. package/src/tools/utils/index.ts +0 -27
  53. package/src/tools/utils/isTokenGraduated.ts +0 -16
  54. package/src/types/mcp.ts +0 -72
  55. package/src/utils/__tests__/validation.test.ts +0 -147
  56. package/src/utils/constraints.ts +0 -146
  57. package/src/utils/default-values.ts +0 -208
  58. package/src/utils/error-handler.ts +0 -69
  59. package/src/utils/error-templates.ts +0 -273
  60. package/src/utils/response-formatter.ts +0 -51
  61. package/src/utils/tool-factory.ts +0 -257
  62. package/src/utils/tool-registry.ts +0 -296
  63. package/src/utils/validation.ts +0 -336
  64. package/tsconfig.json +0 -23
package/CHANGELOG.md CHANGED
@@ -1,5 +1,24 @@
1
1
  # Changelog
2
2
 
3
+ ## 1.8.2
4
+
5
+ ### Patch Changes
6
+
7
+ - Fix SDK version detection by using build-time version injection instead of runtime file reading.
8
+ The SDK now generates a version constant during build, ensuring it works in all environments
9
+ (Node.js, browser, bundled). Additionally, added a `/version` slash command to the MCP server for
10
+ easy version checking.
11
+
12
+ ### Changes:
13
+ - **SDK**: Implement build-time version injection via `scripts/inject-version.ts`, matching the
14
+ MCP server pattern
15
+ - **SDK**: Update `packages/sdk/package.json` to run `build:version` before compilation
16
+ - **MCP Server**: Add new `utility` prompt category with `/version` command to fetch and display
17
+ SDK/MCP server versions
18
+
19
+ - Updated dependencies
20
+ - @gala-chain/launchpad-sdk@3.12.8
21
+
3
22
  ## 1.8.1
4
23
 
5
24
  ### Patch Changes
@@ -3,5 +3,5 @@
3
3
  * This file is generated by scripts/inject-version.ts during build
4
4
  * DO NOT EDIT MANUALLY
5
5
  */
6
- export declare const MCP_SERVER_VERSION = "1.8.1";
6
+ export declare const MCP_SERVER_VERSION = "1.8.2";
7
7
  //# sourceMappingURL=version.d.ts.map
@@ -6,5 +6,5 @@
6
6
  */
7
7
  Object.defineProperty(exports, "__esModule", { value: true });
8
8
  exports.MCP_SERVER_VERSION = void 0;
9
- exports.MCP_SERVER_VERSION = '1.8.1';
9
+ exports.MCP_SERVER_VERSION = '1.8.2';
10
10
  //# sourceMappingURL=version.js.map
@@ -6,6 +6,7 @@
6
6
  import { tradingPrompts } from './trading.js';
7
7
  import { portfolioPrompts } from './portfolio.js';
8
8
  import { analysisPrompts } from './analysis.js';
9
+ import { utilityPrompts } from './utility.js';
9
10
  import type { MCPPrompt } from '../types/mcp.js';
10
11
  /**
11
12
  * All available prompts
@@ -55,7 +56,7 @@ export declare function hasPrompt(name: string): boolean;
55
56
  /**
56
57
  * Get prompts by category
57
58
  *
58
- * @param category - Category name ('trading', 'portfolio', or 'analysis')
59
+ * @param category - Category name ('trading', 'portfolio', 'analysis', or 'utility')
59
60
  * @returns Array of prompts in the specified category
60
61
  *
61
62
  * @example
@@ -64,7 +65,7 @@ export declare function hasPrompt(name: string): boolean;
64
65
  * // Returns [analyzeTokenPrompt, buyTokensPrompt, sellTokensPrompt, graduateTokenPrompt]
65
66
  * ```
66
67
  */
67
- export declare function getPromptsByCategory(category: 'trading' | 'portfolio' | 'analysis'): MCPPrompt[];
68
+ export declare function getPromptsByCategory(category: 'trading' | 'portfolio' | 'analysis' | 'utility'): MCPPrompt[];
68
69
  /**
69
70
  * Get prompt count
70
71
  *
@@ -79,5 +80,5 @@ export declare function getPromptCount(): number;
79
80
  /**
80
81
  * Export individual prompt categories for documentation
81
82
  */
82
- export { tradingPrompts, portfolioPrompts, analysisPrompts };
83
+ export { tradingPrompts, portfolioPrompts, analysisPrompts, utilityPrompts };
83
84
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/prompts/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAC9C,OAAO,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAClD,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAChD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAEjD;;GAEG;AACH,eAAO,MAAM,OAAO,EAAE,SAAS,EAI9B,CAAC;AAUF;;;;;;;;;;;;;GAaG;AACH,wBAAgB,SAAS,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS,GAAG,SAAS,CAE7D;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,cAAc,IAAI,MAAM,EAAE,CAEzC;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,SAAS,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAE/C;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,oBAAoB,CAClC,QAAQ,EAAE,SAAS,GAAG,WAAW,GAAG,UAAU,GAC7C,SAAS,EAAE,CAWb;AAED;;;;;;;;;GASG;AACH,wBAAgB,cAAc,IAAI,MAAM,CAEvC;AAED;;GAEG;AACH,OAAO,EAAE,cAAc,EAAE,gBAAgB,EAAE,eAAe,EAAE,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/prompts/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAC9C,OAAO,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAClD,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAChD,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAC9C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAEjD;;GAEG;AACH,eAAO,MAAM,OAAO,EAAE,SAAS,EAK9B,CAAC;AAUF;;;;;;;;;;;;;GAaG;AACH,wBAAgB,SAAS,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS,GAAG,SAAS,CAE7D;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,cAAc,IAAI,MAAM,EAAE,CAEzC;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,SAAS,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAE/C;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,oBAAoB,CAClC,QAAQ,EAAE,SAAS,GAAG,WAAW,GAAG,UAAU,GAAG,SAAS,GACzD,SAAS,EAAE,CAab;AAED;;;;;;;;;GASG;AACH,wBAAgB,cAAc,IAAI,MAAM,CAEvC;AAED;;GAEG;AACH,OAAO,EAAE,cAAc,EAAE,gBAAgB,EAAE,eAAe,EAAE,cAAc,EAAE,CAAC"}
@@ -5,7 +5,7 @@
5
5
  * Provides user-friendly slash commands for common Launchpad workflows
6
6
  */
7
7
  Object.defineProperty(exports, "__esModule", { value: true });
8
- exports.analysisPrompts = exports.portfolioPrompts = exports.tradingPrompts = exports.prompts = void 0;
8
+ exports.utilityPrompts = exports.analysisPrompts = exports.portfolioPrompts = exports.tradingPrompts = exports.prompts = void 0;
9
9
  exports.getPrompt = getPrompt;
10
10
  exports.getPromptNames = getPromptNames;
11
11
  exports.hasPrompt = hasPrompt;
@@ -17,6 +17,8 @@ const portfolio_js_1 = require("./portfolio.js");
17
17
  Object.defineProperty(exports, "portfolioPrompts", { enumerable: true, get: function () { return portfolio_js_1.portfolioPrompts; } });
18
18
  const analysis_js_1 = require("./analysis.js");
19
19
  Object.defineProperty(exports, "analysisPrompts", { enumerable: true, get: function () { return analysis_js_1.analysisPrompts; } });
20
+ const utility_js_1 = require("./utility.js");
21
+ Object.defineProperty(exports, "utilityPrompts", { enumerable: true, get: function () { return utility_js_1.utilityPrompts; } });
20
22
  /**
21
23
  * All available prompts
22
24
  */
@@ -24,6 +26,7 @@ exports.prompts = [
24
26
  ...trading_js_1.tradingPrompts,
25
27
  ...portfolio_js_1.portfolioPrompts,
26
28
  ...analysis_js_1.analysisPrompts,
29
+ ...utility_js_1.utilityPrompts,
27
30
  ];
28
31
  /**
29
32
  * Optimized prompt registry using Map for O(1) lookups
@@ -80,7 +83,7 @@ function hasPrompt(name) {
80
83
  /**
81
84
  * Get prompts by category
82
85
  *
83
- * @param category - Category name ('trading', 'portfolio', or 'analysis')
86
+ * @param category - Category name ('trading', 'portfolio', 'analysis', or 'utility')
84
87
  * @returns Array of prompts in the specified category
85
88
  *
86
89
  * @example
@@ -97,6 +100,8 @@ function getPromptsByCategory(category) {
97
100
  return portfolio_js_1.portfolioPrompts;
98
101
  case 'analysis':
99
102
  return analysis_js_1.analysisPrompts;
103
+ case 'utility':
104
+ return utility_js_1.utilityPrompts;
100
105
  default:
101
106
  return [];
102
107
  }
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/prompts/index.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;AAsCH,8BAEC;AAaD,wCAEC;AAeD,8BAEC;AAcD,oDAaC;AAYD,wCAEC;AA/GD,6CAA8C;AAoHrC,+FApHA,2BAAc,OAoHA;AAnHvB,iDAAkD;AAmHzB,iGAnHhB,+BAAgB,OAmHgB;AAlHzC,+CAAgD;AAkHL,gGAlHlC,6BAAe,OAkHkC;AA/G1D;;GAEG;AACU,QAAA,OAAO,GAAgB;IAClC,GAAG,2BAAc;IACjB,GAAG,+BAAgB;IACnB,GAAG,6BAAe;CACnB,CAAC;AAEF;;;GAGG;AACH,MAAM,SAAS,GAAG,IAAI,GAAG,CACvB,eAAO,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,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ACnB,GAAG,6BAAe;IAClB,GAAG,2BAAc;CAClB,CAAC;AAEF;;;GAGG;AACH,MAAM,SAAS,GAAG,IAAI,GAAG,CACvB,eAAO,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,MAAM,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC,CAC/C,CAAC;AAEF;;;;;;;;;;;;;GAaG;AACH,SAAgB,SAAS,CAAC,IAAY;IACpC,OAAO,SAAS,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;AAC7B,CAAC;AAED;;;;;;;;;;GAUG;AACH,SAAgB,cAAc;IAC5B,OAAO,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,IAAI,EAAE,CAAC,CAAC;AACtC,CAAC;AAED;;;;;;;;;;;;GAYG;AACH,SAAgB,SAAS,CAAC,IAAY;IACpC,OAAO,SAAS,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;AAC7B,CAAC;AAED;;;;;;;;;;;GAWG;AACH,SAAgB,oBAAoB,CAClC,QAA0D;IAE1D,QAAQ,QAAQ,EAAE,CAAC;QACjB,KAAK,SAAS;YACZ,OAAO,2BAAc,CAAC;QACxB,KAAK,WAAW;YACd,OAAO,+BAAgB,CAAC;QAC1B,KAAK,UAAU;YACb,OAAO,6BAAe,CAAC;QACzB,KAAK,SAAS;YACZ,OAAO,2BAAc,CAAC;QACxB;YACE,OAAO,EAAE,CAAC;IACd,CAAC;AACH,CAAC;AAED;;;;;;;;;GASG;AACH,SAAgB,cAAc;IAC5B,OAAO,SAAS,CAAC,IAAI,CAAC;AACxB,CAAC"}
@@ -0,0 +1,18 @@
1
+ /**
2
+ * Utility Prompts
3
+ *
4
+ * Slash commands for utility and information operations on Gala Launchpad
5
+ */
6
+ import type { MCPPrompt } from '../types/mcp.js';
7
+ /**
8
+ * Get Version - Display SDK and MCP server version information
9
+ *
10
+ * Shows the current versions of both the Gala Launchpad SDK and the MCP server,
11
+ * useful for debugging version mismatch issues or verifying installed versions.
12
+ */
13
+ export declare const getVersionPrompt: MCPPrompt;
14
+ /**
15
+ * All utility prompts
16
+ */
17
+ export declare const utilityPrompts: MCPPrompt[];
18
+ //# sourceMappingURL=utility.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utility.d.ts","sourceRoot":"","sources":["../../src/prompts/utility.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAEjD;;;;;GAKG;AACH,eAAO,MAAM,gBAAgB,EAAE,SAuB9B,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,cAAc,EAAE,SAAS,EAAuB,CAAC"}
@@ -0,0 +1,43 @@
1
+ "use strict";
2
+ /**
3
+ * Utility Prompts
4
+ *
5
+ * Slash commands for utility and information operations on Gala Launchpad
6
+ */
7
+ Object.defineProperty(exports, "__esModule", { value: true });
8
+ exports.utilityPrompts = exports.getVersionPrompt = void 0;
9
+ /**
10
+ * Get Version - Display SDK and MCP server version information
11
+ *
12
+ * Shows the current versions of both the Gala Launchpad SDK and the MCP server,
13
+ * useful for debugging version mismatch issues or verifying installed versions.
14
+ */
15
+ exports.getVersionPrompt = {
16
+ name: 'galachain-launchpad:version',
17
+ description: 'Get SDK and MCP server version information',
18
+ handler: () => {
19
+ return [
20
+ {
21
+ role: 'user',
22
+ content: {
23
+ type: 'text',
24
+ text: `Get version information for the Gala Launchpad SDK and MCP server.
25
+
26
+ Use the gala_launchpad_get_version tool to fetch the version details.
27
+
28
+ Display the results in a clear, formatted response showing:
29
+ 1. SDK Version
30
+ 2. MCP Server Version
31
+ 3. Timestamp
32
+
33
+ This is helpful for debugging version compatibility issues or confirming installed versions.`,
34
+ },
35
+ },
36
+ ];
37
+ },
38
+ };
39
+ /**
40
+ * All utility prompts
41
+ */
42
+ exports.utilityPrompts = [exports.getVersionPrompt];
43
+ //# sourceMappingURL=utility.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utility.js","sourceRoot":"","sources":["../../src/prompts/utility.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;AAIH;;;;;GAKG;AACU,QAAA,gBAAgB,GAAc;IACzC,IAAI,EAAE,6BAA6B;IACnC,WAAW,EAAE,4CAA4C;IACzD,OAAO,EAAE,GAAG,EAAE;QACZ,OAAO;YACL;gBACE,IAAI,EAAE,MAAM;gBACZ,OAAO,EAAE;oBACP,IAAI,EAAE,MAAM;oBACZ,IAAI,EAAE;;;;;;;;;6FAS6E;iBACpF;aACF;SACF,CAAC;IACJ,CAAC;CACF,CAAC;AAEF;;GAEG;AACU,QAAA,cAAc,GAAgB,CAAC,wBAAgB,CAAC,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gala-chain/launchpad-mcp-server",
3
- "version": "1.8.1",
3
+ "version": "1.8.2",
4
4
  "description": "MCP server for Gala Launchpad SDK with 51 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": {
@@ -63,7 +63,7 @@
63
63
  "dependencies": {
64
64
  "@gala-chain/api": "^2.4.3",
65
65
  "@gala-chain/connect": "^2.4.3",
66
- "@gala-chain/launchpad-sdk": "^3.12.7",
66
+ "@gala-chain/launchpad-sdk": "^3.12.8",
67
67
  "@modelcontextprotocol/sdk": "^0.5.0",
68
68
  "axios": "^1.12.2",
69
69
  "bignumber.js": "^9.1.2",