@gala-chain/launchpad-mcp-server 1.12.4 → 1.13.1

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 (69) hide show
  1. package/CHANGELOG.md +111 -0
  2. package/dist/generated/version.d.ts +1 -1
  3. package/dist/generated/version.js +1 -1
  4. package/dist/tools/pools/fetchAllPriceHistory.d.ts +2 -2
  5. package/dist/tools/pools/fetchAllPriceHistory.d.ts.map +1 -1
  6. package/dist/tools/pools/fetchAllPriceHistory.js +8 -6
  7. package/dist/tools/pools/fetchAllPriceHistory.js.map +1 -1
  8. package/dist/tools/pools/fetchPriceHistory.d.ts +2 -2
  9. package/dist/tools/pools/fetchPriceHistory.d.ts.map +1 -1
  10. package/dist/tools/pools/fetchPriceHistory.js +8 -6
  11. package/dist/tools/pools/fetchPriceHistory.js.map +1 -1
  12. package/docs/AI-AGENT-PATTERNS.md +555 -0
  13. package/docs/CONSTRAINTS-REFERENCE.md +454 -0
  14. package/docs/PROMPT-TOOL-MAPPING.md +352 -0
  15. package/docs/examples/default-values-pattern.md +240 -0
  16. package/docs/examples/tool-factory-pattern.md +217 -0
  17. package/jest.config.js +94 -0
  18. package/package.json +2 -2
  19. package/src/__tests__/integration/poolTools.integration.test.ts +185 -0
  20. package/src/constants/mcpToolNames.ts +141 -0
  21. package/src/index.ts +19 -0
  22. package/src/prompts/__tests__/promptStructure.test.ts +114 -0
  23. package/src/prompts/__tests__/registry.test.ts +143 -0
  24. package/src/prompts/analysis.ts +429 -0
  25. package/src/prompts/index.ts +127 -0
  26. package/src/prompts/portfolio.ts +242 -0
  27. package/src/prompts/trading.ts +191 -0
  28. package/src/prompts/utility.ts +43 -0
  29. package/src/prompts/utils/workflowTemplates.ts +344 -0
  30. package/src/schemas/common-schemas.ts +392 -0
  31. package/src/scripts/test-all-prompts.ts +184 -0
  32. package/src/server.ts +247 -0
  33. package/src/tools/balance/index.ts +174 -0
  34. package/src/tools/creation/index.ts +182 -0
  35. package/src/tools/index.ts +80 -0
  36. package/src/tools/pools/fetchAllPools.ts +47 -0
  37. package/src/tools/pools/fetchAllPriceHistory.ts +103 -0
  38. package/src/tools/pools/fetchAllPrices.ts +39 -0
  39. package/src/tools/pools/fetchPoolDetails.ts +27 -0
  40. package/src/tools/pools/fetchPoolDetailsForCalculation.ts +22 -0
  41. package/src/tools/pools/fetchPools.ts +47 -0
  42. package/src/tools/pools/fetchPriceHistory.ts +108 -0
  43. package/src/tools/pools/fetchPrices.ts +52 -0
  44. package/src/tools/pools/index.ts +248 -0
  45. package/src/tools/social/index.ts +64 -0
  46. package/src/tools/trading/index.ts +605 -0
  47. package/src/tools/transfers/index.ts +75 -0
  48. package/src/tools/utils/clearCache.ts +36 -0
  49. package/src/tools/utils/createWallet.ts +19 -0
  50. package/src/tools/utils/explainSdkUsage.ts +853 -0
  51. package/src/tools/utils/getAddress.ts +12 -0
  52. package/src/tools/utils/getCacheInfo.ts +14 -0
  53. package/src/tools/utils/getConfig.ts +11 -0
  54. package/src/tools/utils/getEthereumAddress.ts +12 -0
  55. package/src/tools/utils/getUrlByTokenName.ts +12 -0
  56. package/src/tools/utils/getVersion.ts +25 -0
  57. package/src/tools/utils/index.ts +27 -0
  58. package/src/tools/utils/isTokenGraduated.ts +16 -0
  59. package/src/types/mcp.ts +72 -0
  60. package/src/utils/__tests__/validation.test.ts +147 -0
  61. package/src/utils/constraints.ts +146 -0
  62. package/src/utils/default-values.ts +208 -0
  63. package/src/utils/error-handler.ts +69 -0
  64. package/src/utils/error-templates.ts +273 -0
  65. package/src/utils/response-formatter.ts +51 -0
  66. package/src/utils/tool-factory.ts +257 -0
  67. package/src/utils/tool-registry.ts +296 -0
  68. package/src/utils/validation.ts +336 -0
  69. package/tsconfig.json +23 -0
package/CHANGELOG.md CHANGED
@@ -1,5 +1,116 @@
1
1
  # Changelog
2
2
 
3
+ ## 1.13.1
4
+
5
+ ### Patch Changes
6
+
7
+ - ## Fix: Price History Token Format Mapping (v3.16.1)
8
+
9
+ **Critical Fix:** Corrects token ID format conversion for DEX Backend API.
10
+
11
+ The DEX Backend API uses a different token format than GalaChain:
12
+ - API format: `tokenName$Unit$none$none` (e.g., `GALA$Unit$none$none`)
13
+ - SDK format: `collection|category|type|additionalKey` (e.g., `Token|Unit|GALA|none`)
14
+
15
+ ### Changes
16
+
17
+ **PriceHistoryService.ts:**
18
+ - Fixed token format conversion when calling DEX Backend API
19
+ - Now correctly maps GalaChain TokenInstanceKey fields to API format
20
+ - Token name is extracted from the `type` field (where it's stored in GalaChain)
21
+ - API always receives properly formatted: `{tokenName}$Unit$none$none`
22
+
23
+ ### Impact
24
+ - `fetchPriceHistory()` now returns historical price data correctly
25
+ - MCP tool `gala_launchpad_fetch_price_history` now works as expected
26
+ - All 30,000+ price snapshots now accessible for supported tokens
27
+
28
+ ### Before
29
+
30
+ ```typescript
31
+ // Input: Token|Unit|GALA|none
32
+ // Converted to: Token$Unit$GALA$none (WRONG - API expected GALA$Unit$none$none)
33
+ // Result: Empty response, no historical data
34
+ ```
35
+
36
+ ### After
37
+
38
+ ```typescript
39
+ // Input: Token|Unit|GALA|none
40
+ // Converted to: GALA$Unit$none$none (CORRECT)
41
+ // Result: Returns all 30,862 GALA price snapshots
42
+ ```
43
+
44
+ This is a critical fix for price history functionality.
45
+
46
+ - Updated dependencies
47
+ - @gala-chain/launchpad-sdk@3.16.1
48
+
49
+ ## 1.13.0
50
+
51
+ ### Minor Changes
52
+
53
+ - ## Price History API Migration (v3.16.0)
54
+
55
+ Migrate `fetchPriceHistory` and `fetchAllPriceHistory` methods from MySQL database backend to DEX
56
+ Backend API for improved performance and real-time data availability.
57
+
58
+ ### SDK Changes (@gala-chain/launchpad-sdk)
59
+ - **New**: Added `tokenFormatConverter` utility (`src/utils/tokenFormatConverter.ts`)
60
+ - Convert between pipe-delimited (`Token|Unit|GUSDC|eth:...`) and dollar-delimited token formats
61
+ - Convert sort order from SDK format (uppercase) to API format (lowercase)
62
+ - **Updated**: `environments.ts` - Added separate `dexBackendBaseUrl` configuration for DEX
63
+ Backend service
64
+ - Production: `https://dex-backend-prod1.defi.gala.com`
65
+ - Stage: `https://dex-backend-dev1.defi.gala.com`
66
+ - **Updated**: `PriceHistoryService` - Migrated to DEX Backend API
67
+ - `fetchPriceHistory()` now uses `/price-oracle/fetch-price` endpoint
68
+ - `fetchAllPriceHistory()` uses automatic pagination over API
69
+ - Automatic token format conversion (pipe → dollar delimited)
70
+ - Automatic sort order conversion (uppercase → lowercase)
71
+ - `fetchPrices()` and `fetchAllPrices()` remain MySQL-based for latest price queries
72
+ - **Updated**: `LaunchpadSDK` - Added `dexBackendHttp` client initialization with
73
+ `dexBackendBaseUrl`
74
+ - **Updated**: Type definitions - Added `DexPriceOracleResponse` interface for API response
75
+ mapping
76
+ - **Updated**: Tests - Updated to mock HTTP client instead of MySQL connections
77
+ - Added tests for token format conversion
78
+ - Added tests for sort order conversion
79
+ - Added tests for API error handling
80
+
81
+ ### MCP Changes (@gala-chain/launchpad-mcp-server)
82
+ - **Updated**: `fetchPriceHistory` tool description
83
+ - Reflects new DEX Backend API endpoint usage
84
+ - Removes MySQL configuration requirements
85
+ - Adds endpoint reference (`/price-oracle/fetch-price`)
86
+ - **Updated**: `fetchAllPriceHistory` tool description
87
+ - Updated for API-based implementation
88
+ - Reflects automatic pagination handling
89
+
90
+ ### Documentation
91
+ - **Updated**: `CLAUDE.md` - Comprehensive price history patterns documentation
92
+ - Dual-backend architecture explanation
93
+ - API vs MySQL comparison
94
+ - Configuration examples for both methods
95
+ - Performance characteristics for each approach
96
+ - Important notes for API-based queries
97
+
98
+ ### Backward Compatibility
99
+
100
+ ✅ Fully backward compatible - SDK interfaces unchanged ✅ Automatic format conversion handles
101
+ token format differences ✅ Dual-backend support maintains MySQL for price sheet queries
102
+
103
+ ### Performance Improvements
104
+ - ✅ API-based queries typically <500ms per request
105
+ - ✅ Real-time data availability
106
+ - ✅ No database connection overhead
107
+ - ✅ Improved scalability for high-volume queries
108
+
109
+ ### Patch Changes
110
+
111
+ - Updated dependencies
112
+ - @gala-chain/launchpad-sdk@3.16.0
113
+
3
114
  ## 1.12.4
4
115
 
5
116
  ### 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.12.4";
6
+ export declare const MCP_SERVER_VERSION = "1.13.1";
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.12.4';
9
+ exports.MCP_SERVER_VERSION = '1.13.1';
10
10
  //# sourceMappingURL=version.js.map
@@ -1,8 +1,8 @@
1
1
  /**
2
2
  * Fetch All Price History Tool
3
3
  *
4
- * Queries all historical token price data from MySQL database with automatic pagination.
5
- * Requires MYSQL_CONNECTION_STRING environment variable to be configured.
4
+ * Queries all historical token price data from DEX Backend API with automatic pagination.
5
+ * Uses the /price-oracle/fetch-price endpoint for complete price history retrieval.
6
6
  */
7
7
  import type { MCPTool } from '../../types/mcp.js';
8
8
  export declare const fetchAllPriceHistoryTool: MCPTool;
@@ -1 +1 @@
1
- {"version":3,"file":"fetchAllPriceHistory.d.ts","sourceRoot":"","sources":["../../../src/tools/pools/fetchAllPriceHistory.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAIlD,eAAO,MAAM,wBAAwB,EAAE,OAyFtC,CAAC"}
1
+ {"version":3,"file":"fetchAllPriceHistory.d.ts","sourceRoot":"","sources":["../../../src/tools/pools/fetchAllPriceHistory.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAIlD,eAAO,MAAM,wBAAwB,EAAE,OA2FtC,CAAC"}
@@ -2,8 +2,8 @@
2
2
  /**
3
3
  * Fetch All Price History Tool
4
4
  *
5
- * Queries all historical token price data from MySQL database with automatic pagination.
6
- * Requires MYSQL_CONNECTION_STRING environment variable to be configured.
5
+ * Queries all historical token price data from DEX Backend API with automatic pagination.
6
+ * Uses the /price-oracle/fetch-price endpoint for complete price history retrieval.
7
7
  */
8
8
  Object.defineProperty(exports, "__esModule", { value: true });
9
9
  exports.fetchAllPriceHistoryTool = void 0;
@@ -11,12 +11,14 @@ const response_formatter_js_1 = require("../../utils/response-formatter.js");
11
11
  const error_handler_js_1 = require("../../utils/error-handler.js");
12
12
  exports.fetchAllPriceHistoryTool = {
13
13
  name: 'gala_launchpad_fetch_all_price_history',
14
- description: `Fetch all historical price snapshots for DEX tokens with automatic pagination.
14
+ description: `Fetch all historical price snapshots for DEX tokens from the DEX Backend API with automatic pagination.
15
+
16
+ **Endpoint:** \`/price-oracle/fetch-price\`
15
17
 
16
18
  **Requirements:**
17
- - MySQL connection string must be configured (MYSQL_CONNECTION_STRING env var)
19
+ - DEX Backend API must be configured (dexBackendBaseUrl in SDK config)
18
20
  - Node.js environment only (not available in browser)
19
- - Only works for DEX tokens with price_snapshots table data
21
+ - Token parameter is required
20
22
 
21
23
  **Use Cases:**
22
24
  - Complete historical price analysis and charting
@@ -24,7 +26,7 @@ exports.fetchAllPriceHistoryTool = {
24
26
  - Comprehensive volatility analysis
25
27
  - Data export for external analytics
26
28
 
27
- **Performance:** Automatic pagination (max 100 items per page, combined into single result).`,
29
+ **Performance:** API-based queries with automatic pagination (max 100 items per page, combined into single result).`,
28
30
  inputSchema: {
29
31
  type: 'object',
30
32
  properties: {
@@ -1 +1 @@
1
- {"version":3,"file":"fetchAllPriceHistory.js","sourceRoot":"","sources":["../../../src/tools/pools/fetchAllPriceHistory.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAGH,6EAAkE;AAClE,mEAAiE;AAEpD,QAAA,wBAAwB,GAAY;IAC/C,IAAI,EAAE,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* Queries historical token price data from MySQL database.
5
- * Requires MYSQL_CONNECTION_STRING environment variable to be configured.
4
+ * Queries historical token price data from DEX Backend API.
5
+ * Uses the /price-oracle/fetch-price endpoint for paginated price history retrieval.
6
6
  */
7
7
  import type { MCPTool } from '../../types/mcp.js';
8
8
  export declare const fetchPriceHistoryTool: MCPTool;
@@ -1 +1 @@
1
- {"version":3,"file":"fetchPriceHistory.d.ts","sourceRoot":"","sources":["../../../src/tools/pools/fetchPriceHistory.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAKlD,eAAO,MAAM,qBAAqB,EAAE,OA6FnC,CAAC"}
1
+ {"version":3,"file":"fetchPriceHistory.d.ts","sourceRoot":"","sources":["../../../src/tools/pools/fetchPriceHistory.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAKlD,eAAO,MAAM,qBAAqB,EAAE,OA+FnC,CAAC"}
@@ -2,8 +2,8 @@
2
2
  /**
3
3
  * Fetch Price History Tool
4
4
  *
5
- * Queries historical token price data from MySQL database.
6
- * Requires MYSQL_CONNECTION_STRING environment variable to be configured.
5
+ * Queries historical token price data from DEX Backend API.
6
+ * Uses the /price-oracle/fetch-price endpoint for paginated price history retrieval.
7
7
  */
8
8
  Object.defineProperty(exports, "__esModule", { value: true });
9
9
  exports.fetchPriceHistoryTool = void 0;
@@ -12,12 +12,14 @@ const error_handler_js_1 = require("../../utils/error-handler.js");
12
12
  const common_schemas_js_1 = require("../../schemas/common-schemas.js");
13
13
  exports.fetchPriceHistoryTool = {
14
14
  name: 'gala_launchpad_fetch_price_history',
15
- description: `Fetch historical price snapshots for DEX tokens from MySQL database.
15
+ description: `Fetch historical price snapshots for DEX tokens from the DEX Backend API.
16
+
17
+ **Endpoint:** \`/price-oracle/fetch-price\`
16
18
 
17
19
  **Requirements:**
18
- - MySQL connection string must be configured (MYSQL_CONNECTION_STRING env var)
20
+ - DEX Backend API must be configured (dexBackendBaseUrl in SDK config)
19
21
  - Node.js environment only (not available in browser)
20
- - Only works for DEX tokens with price_snapshots table data
22
+ - Token parameter is required
21
23
 
22
24
  **Use Cases:**
23
25
  - Historical price analysis and charting
@@ -25,7 +27,7 @@ exports.fetchPriceHistoryTool = {
25
27
  - Volatility analysis over time periods
26
28
  - Data export for external analytics
27
29
 
28
- **Performance:** Direct MySQL queries with pagination support (max 100 items per page).`,
30
+ **Performance:** API-based queries with pagination support (max 100 items per page).`,
29
31
  inputSchema: {
30
32
  type: 'object',
31
33
  properties: {
@@ -1 +1 @@
1
- {"version":3,"file":"fetchPriceHistory.js","sourceRoot":"","sources":["../../../src/tools/pools/fetchPriceHistory.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAGH,6EAAkE;AAClE,mEAAiE;AACjE,uEAAiF;AAEpE,QAAA,qBAAqB,GAAY;IAC5C,IAAI,EAAE,oCAAoC;IAC1C,WAAW,EAAE;;;;;;;;;;;;;wFAayE;IAEtF,WAAW,EAAE;QACX,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE;YACV,OAAO,EAAE;gBACP,KAAK,EAAE;oBACL;wBACE,IAAI,EAAE,QAAQ;wBACd,WAAW,EACT,oGAAoG;qBACvG;oBACD;wBACE,IAAI,EAAE,QAAQ;wBACd,UAAU,EAAE;4BACV,UAAU,EAAE;gCACV,IAAI,EAAE,QAAQ;gCACd,WAAW,EAAE,kCAAkC;6BAChD;4BACD,QAAQ,EAAE;gCACR,IAAI,EAAE,QAAQ;gCACd,WAAW,EAAE,+BAA+B;6BAC7C;4BACD,IAAI,EAAE;gCACJ,IAAI,EAAE,QAAQ;gCACd,WAAW,EAAE,4BAA4B;6BAC1C;4BACD,aAAa,EAAE;gCACb,IAAI,EAAE,QAAQ;gCACd,WAAW,EAAE,oCAAoC;6BAClD;yBACF;wBACD,QAAQ,EAAE,CAAC,YAAY,EAAE,UAAU,E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CAAC,CAAC;CACH,CAAC"}
1
+ {"version":3,"file":"fetchPriceHistory.js","sourceRoot":"","sources":["../../../src/tools/pools/fetchPriceHistory.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAGH,6EAAkE;AAClE,mEAAiE;AACjE,uEAAiF;AAEpE,QAAA,qBAAqB,GAAY;IAC5C,IAAI,EAAE,oCAAoC;IAC1C,WAAW,EAAE;;;;;;;;;;;;;;;qFAesE;IAEnF,WAAW,EAAE;QACX,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE;YACV,OAAO,EAAE;gBACP,KAAK,EAAE;oBACL;wBACE,IAAI,EAAE,QAAQ;wBACd,WAAW,EACT,oGAAoG;qBACvG;oBACD;wBACE,IAAI,EAAE,QAAQ;wBACd,UAAU,EAAE;4BACV,UAAU,EAAE;gCACV,IAAI,EAAE,QAAQ;gCACd,WAAW,EAAE,kCAAkC;6BAChD;4BACD,QAAQ,EAAE;gCACR,IAAI,EAAE,QAAQ;gCACd,WAAW,EAAE,+BAA+B;6BAC7C;4BACD,IAAI,EAAE;gCACJ,IAAI,EAAE,QAAQ;gCACd,WAAW,EAAE,4BAA4B;6BAC1C;4BACD,aAAa,EAAE;gCACb,IAAI,EAAE,QAAQ;gCACd,WAAW,EAAE,oCAAoC;6BAClD;yBACF;wBACD,QAAQ,EAAE,CAAC,YAAY,EAAE,UAAU,EAAE,MAAM,EAAE,eAAe,CAAC;wBAC7D,WAAW,EAAE,6BAA6B;qBAC3C;iBACF;gBACD,WAAW,EAAE,mDAAmD;aACjE;YACD,IAAI,EAAE;gBACJ,IAAI,EAAE,QAAQ;gBACd,MAAM,EAAE,WAAW;gBACnB,WAAW,EAAE,qEAAqE;aACnF;YACD,EAAE,EAAE;gBACF,IAAI,EAAE,QAAQ;gBACd,MAAM,EAAE,WAAW;gBACnB,WAAW,EAAE,2DAA2D;aACzE;YACD,SAAS,EAAE;gBACT,IAAI,EAAE,QAAQ;gBACd,IAAI,EAAE,CAAC,KAAK,EAAE,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