@gala-chain/launchpad-mcp-server 1.2.19 → 1.2.21

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/CHANGELOG.md CHANGED
@@ -1,5 +1,12 @@
1
1
  # Changelog
2
2
 
3
+ ## 1.2.20 - 2025-10-02
4
+
5
+ ### Changed
6
+
7
+ - Updated SDK dependency from ^3.7.5 to ^3.7.6
8
+ - Inherits graduation calculation documentation improvements from SDK v3.7.6
9
+
3
10
  ## 1.2.19 - 2025-10-02
4
11
 
5
12
  ### Documentation
package/README.md CHANGED
@@ -4,7 +4,7 @@ MCP (Model Context Protocol) server for Gala Launchpad SDK - Enables AI agents t
4
4
 
5
5
  ## šŸš€ Features
6
6
 
7
- - **40 AI-accessible tools** for complete Gala Launchpad integration
7
+ - **41 AI-accessible tools** for complete Gala Launchpad integration
8
8
  - **Type-safe** - Full TypeScript support with validated inputs
9
9
  - **Production-ready** - Built on [@gala-chain/launchpad-sdk ](https://www.npmjs.com/package/@gala-chain/launchpad-sdk)
10
10
  - **Easy setup** - Works with Claude Desktop and other MCP clients
@@ -50,7 +50,7 @@ Add to your `claude_desktop_config.json`:
50
50
  3. **Restart Claude Desktop**
51
51
  4. **Use tools**: Ask Claude to interact with Gala Launchpad!
52
52
 
53
- ## šŸ› ļø Available Tools (40 Total)
53
+ ## šŸ› ļø Available Tools (41 Total)
54
54
 
55
55
  ### Pool Management (8 tools)
56
56
  - `gala_launchpad_fetch_pools` - Fetch token pools with filtering
@@ -128,8 +128,9 @@ Add to your `claude_desktop_config.json`:
128
128
  - `gala_launchpad_transfer_gala` - Transfer GALA tokens
129
129
  - `gala_launchpad_transfer_token` - Transfer launchpad tokens
130
130
 
131
- ### Utility Tools (1 tool)
131
+ ### Utility Tools (2 tools)
132
132
  - `gala_launchpad_get_url_by_token_name` - Generate frontend URL for a token
133
+ - `gala_launchpad_explain_sdk_usage` - Get SDK code examples and usage explanations
133
134
 
134
135
  ## šŸ’” Example Usage
135
136
 
@@ -145,6 +146,35 @@ Ask Claude (or your AI assistant):
145
146
 
146
147
  > "Show me all tokens I'm holding"
147
148
 
149
+ ## šŸ“š SDK Usage Reference
150
+
151
+ The MCP server includes a built-in SDK documentation tool that provides complete, runnable code examples for using the SDK directly instead of through MCP tools. This is perfect for developers who want to integrate the SDK into their applications.
152
+
153
+ **Ask Claude for SDK code examples:**
154
+
155
+ > "Explain how to buy tokens using the SDK"
156
+
157
+ > "Show me the SDK code for selling tokens"
158
+
159
+ > "How do I use multiple wallets with the SDK?"
160
+
161
+ > "Show me all MCP tools and their SDK method equivalents"
162
+
163
+ **Available topics:**
164
+ - `buy-tokens` - Complete buying workflow
165
+ - `sell-tokens` - Complete selling workflow
166
+ - `pool-graduation` - Graduate bonding curve pools
167
+ - `fetch-pools` - Query pool data
168
+ - `balances` - Check GALA and token balances
169
+ - `token-creation` - Launch new tokens
170
+ - `multi-wallet` - Multi-wallet patterns
171
+ - `transfers` - Transfer tokens between wallets
172
+ - `error-handling` - Handle exceptions
173
+ - `installation` - Install and configure SDK
174
+ - `mcp-to-sdk-mapping` - Complete tool-to-method mapping
175
+
176
+ Each topic returns complete TypeScript code with explanations, making it easy to transition from MCP tools to direct SDK integration.
177
+
148
178
  ## šŸ” Multi-Wallet Support
149
179
 
150
180
  All signing operations support an optional `privateKey` parameter for per-operation wallet overrides. This enables:
@@ -1 +1 @@
1
- {"version":3,"file":"common-schemas.d.ts","sourceRoot":"","sources":["../../src/schemas/common-schemas.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAiDH;;;GAGG;AACH,eAAO,MAAM,iBAAiB,KAA6C,CAAC;AAE5E;;;GAGG;AACH,eAAO,MAAM,mBAAmB,KAAiD,CAAC;AAElF;;;GAGG;AACH,eAAO,MAAM,wBAAwB,KAGpC,CAAC;AAMF;;;GAGG;AACH,eAAO,MAAM,kBAAkB,KAG9B,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,cAAc,KAAuD,CAAC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CPSchema(zodSchema, customDescription) {
26
26
  const jsonSchema = (0, zod_to_json_schema_1.zodToJsonSchema)(zodSchema, { $refStrategy: 'none' });
27
27
  // Extract the schema properties (removing $schema metadata)
28
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
28
29
  const { $schema, ...schemaProps } = jsonSchema;
29
30
  // Override description if provided
30
31
  if (customDescription) {
@@ -1 +1 @@
1
- {"version":3,"file":"common-schemas.js","sourceRoot":"","sources":["../../src/schemas/common-schemas.ts"],"names":[],"mappings":";AAAA;;;;;;;;;GASG;;;AAkMH,8CA6BC;AA7ND,2DAAqD;AACrD,6DAiBmC;AACnC,4DAA0D;AAE1D,gFAAgF;AAChF,2DAA2D;AAC3D,gFAAgF;AAEhF;;;GAGG;AACH,SAAS,WAAW,CAAC,SAAc,EAAE,iBAA0B;IAC7D,MAAM,UAAU,GAAG,IAAA,oCAAe,EAAC,SAAS,EAAE,EAAE,YAAY,EAAE,MAAM,EAAE,CAAC,CAAC;IAExE,4DAA4D;IAC5D,MAAM,EAAE,OAAO,EAAE,GAAG,WAAW,EAAE,GAAG,UAAU,CAAC;IAE/C,mCAAmC;IACnC,IAAI,iBAAiB,EAAE,CAAC;QACtB,WAAW,CAAC,WAAW,GAAG,iBAAiB,CAAC;IAC9C,CAAC;IAED,OAAO,WAAW,CAAC;AACrB,CAAC;AAED,gFAAgF;AAChF,2BAA2B;AAC3B,gFAAgF;AAEhF;;;GAGG;AACU,QAAA,iBAAiB,GAAG,WAAW,CAAC,+BAAe,EAAE,YAAY,CAAC,CAAC;AAE5E;;;GAGG;AACU,QAAA,mBAAmB,GAAG,WAAW,CAAC,iCAAiB,EAAE,cAAc,CAAC,CAAC;AAElF;;;GAGG;AACU,QAAA,wBAAwB,GAAG,WAAW,CACjD,sCAAsB,EACtB,mBAAmB,CACpB,CAAC;AAEF,gFAAgF;AAChF,8CAA8C;AAC9C,gFAAgF;AAEhF;;;GAGG;AACU,QAAA,kBAAkB,GAAG,WAAW,CAC3C,gCAA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,EACR,8BAA8B,YAAY,cAAc,SAAS,CAAC,aAAa,CAAC,GAAG,CACpF,CAAC;IAEF,OAAO,eAKN,CAAC;AACJ,CAAC;AAED,gFAAgF;AAChF,mDAAmD;AACnD,gFAAgF;AAEhF;;GAEG;AACU,QAAA,yBAAyB,GAAG;IACvC,IAAI,EAAE,QAAiB;IACvB,OAAO,EAAE,CAAC;IACV,OAAO,EAAE,CAAC;IACV,WAAW,EAAE,qCAAqC;CACnD,CAAC;AAEF;;GAEG;AACU,QAAA,uBAAuB,GAAG;IACrC,IAAI,EAAE,QAAiB;IACvB,OAAO,EAAE,CAAC;IACV,OAAO,EAAE,CAAC;IACV,WAAW,EACT,+MAA+M;CAClN,CAAC;AAEF;;GAEG;AACU,QAAA,iBAAiB,GAAG;IAC/B,IAAI,EAAE,QAAiB;IACvB,IAAI,EAAE,CAAC,KAAK,EAAE,MAAM,CAAC;IACrB,WAAW,EAAE,4BAA4B;CAC1C,CAAC"}
@@ -191,7 +191,7 @@ exports.fetchLaunchTokenFeeTool = {
191
191
  type: 'object',
192
192
  properties: {},
193
193
  },
194
- handler: (0, error_handler_js_1.withErrorHandling)(async (sdk, args) => {
194
+ handler: (0, error_handler_js_1.withErrorHandling)(async (sdk, _args) => {
195
195
  const feeAmount = await sdk.fetchLaunchTokenFee();
196
196
  return (0, response_formatter_js_1.formatSuccess)({ feeAmount });
197
197
  }),
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/tools/creation/index.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGH,6EAAkE;AAClE,mEAAiE;AACjE,uEAQyC;AAEzC,kBAAkB;AACL,QAAA,eAAe,GAAY;IACtC,IAAI,EAAE,6BAA6B;IACnC,WAAW,EAAE;;;;;;;;;;+FAUgF;IAC7F,WAAW,EAAE;QACX,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE;YACV,SAAS,EAAE,qCAAiB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AAc;IACtC,uBAAe;IACf,4BAAoB;IACpB,8BAAsB;IACtB,+BAAuB;CACxB,CAAC"}
@@ -1,10 +1,10 @@
1
1
  /**
2
2
  * Tool Registry
3
3
  *
4
- * All 37 MCP tools for Gala Launchpad
4
+ * All 41 MCP tools for Gala Launchpad
5
5
  */
6
6
  /**
7
- * Complete tool registry (37 tools)
7
+ * Complete tool registry (41 tools)
8
8
  */
9
9
  export declare const tools: import("../types/mcp.js").MCPTool[];
10
10
  //# sourceMappingURL=index.d.ts.map
@@ -2,7 +2,7 @@
2
2
  /**
3
3
  * Tool Registry
4
4
  *
5
- * All 37 MCP tools for Gala Launchpad
5
+ * All 41 MCP tools for Gala Launchpad
6
6
  */
7
7
  Object.defineProperty(exports, "__esModule", { value: true });
8
8
  exports.tools = void 0;
@@ -14,19 +14,19 @@ const index_js_5 = require("./social/index.js");
14
14
  const index_js_6 = require("./transfers/index.js");
15
15
  const index_js_7 = require("./utils/index.js");
16
16
  /**
17
- * Complete tool registry (37 tools)
17
+ * Complete tool registry (41 tools)
18
18
  */
19
19
  exports.tools = [
20
- ...index_js_1.poolTools, // 12 tools
21
- ...index_js_2.tradingTools, // 7 tools (added getBundlerTransactionResult)
20
+ ...index_js_1.poolTools, // 8 tools
21
+ ...index_js_2.tradingTools, // 8 tools
22
22
  ...index_js_3.balanceTools, // 6 tools
23
- ...index_js_4.creationTools, // 3 tools
23
+ ...index_js_4.creationTools, // 4 tools
24
24
  ...index_js_5.socialTools, // 2 tools
25
25
  ...index_js_6.transferTools, // 2 tools
26
- ...index_js_7.utilityTools, // 5 tools (added createWallet, getAddress, getEthereumAddress, getConfig)
26
+ ...index_js_7.utilityTools, // 6 tools (added explainSdkUsage)
27
27
  ];
28
28
  // Verify tool count
29
- if (exports.tools.length !== 37) {
30
- console.warn(`Warning: Expected 37 tools, but registered ${exports.tools.length} tools`);
29
+ if (exports.tools.length !== 41) {
30
+ console.warn(`Warning: Expected 41 tools, but registered ${exports.tools.length} tools`);
31
31
  }
32
32
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/tools/index.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;AAEH,+CAA6C;AAC7C,iDAAkD;AAClD,iDAAkD;AAClD,kDAAoD;AACpD,gDAAgD;AAChD,mDAAqD;AACrD,+CAAgD;AAEhD;;GAEG;AACU,QAAA,KAAK,GAAG;IACnB,GAAG,oBAAS,EAAO,WAAW;IAC9B,GAAG,uBAAY,EAAI,8CAA8C;IACjE,GAAG,uBAAY,EAAI,UAAU;IAC7B,GAAG,wBAAa,EAAG,UAAU;IAC7B,GAAG,sBAAW,EAAK,UAAU;IAC7B,GAAG,wBAAa,EAAG,UAAU;IAC7B,GAAG,uBAAY,EAAI,0EAA0E;CAC9F,CAAC;AAEF,oBAAoB;AACpB,IAAI,aAAK,CAAC,MAAM,KAAK,EAAE,EAAE,CAAC;IACxB,OAAO,CAAC,IAAI,CACV,8CAA8C,aAAK,CAAC,MAAM,QAAQ,CACnE,CAAC;AACJ,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/tools/index.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;AAEH,+CAA6C;AAC7C,iDAAkD;AAClD,iDAAkD;AAClD,kDAAoD;AACpD,gDAAgD;AAChD,mDAAqD;AACrD,+CAAgD;AAEhD;;GAEG;AACU,QAAA,KAAK,GAAG;IACnB,GAAG,oBAAS,EAAO,UAAU;IAC7B,GAAG,uBAAY,EAAI,UAAU;IAC7B,GAAG,uBAAY,EAAI,UAAU;IAC7B,GAAG,wBAAa,EAAG,UAAU;IAC7B,GAAG,sBAAW,EAAK,UAAU;IAC7B,GAAG,wBAAa,EAAG,UAAU;IAC7B,GAAG,uBAAY,EAAI,kCAAkC;CACtD,CAAC;AAEF,oBAAoB;AACpB,IAAI,aAAK,CAAC,MAAM,KAAK,EAAE,EAAE,CAAC;IACxB,OAAO,CAAC,IAAI,CACV,8CAA8C,aAAK,CAAC,MAAM,QAAQ,CACnE,CAAC;AACJ,CAAC"}
@@ -0,0 +1,12 @@
1
+ /**
2
+ * SDK Usage Explanation Tool
3
+ *
4
+ * Provides detailed explanations and code examples for using the Gala Launchpad SDK directly.
5
+ * Acts as a development reference showing how MCP tools map to SDK methods.
6
+ */
7
+ import type { MCPTool } from '../../types/mcp.js';
8
+ /**
9
+ * SDK Usage Explanation Tool
10
+ */
11
+ export declare const explainSdkUsageTool: MCPTool;
12
+ //# sourceMappingURL=explainSdkUsage.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"explainSdkUsage.d.ts","sourceRoot":"","sources":["../../../src/tools/utils/explainSdkUsage.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAgkBlD;;GAEG;AACH,eAAO,MAAM,mBAAmB,EAAE,OA2DjC,CAAC"}
@@ -0,0 +1,634 @@
1
+ "use strict";
2
+ /**
3
+ * SDK Usage Explanation Tool
4
+ *
5
+ * Provides detailed explanations and code examples for using the Gala Launchpad SDK directly.
6
+ * Acts as a development reference showing how MCP tools map to SDK methods.
7
+ */
8
+ Object.defineProperty(exports, "__esModule", { value: true });
9
+ exports.explainSdkUsageTool = 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
+ /**
13
+ * SDK code examples organized by topic
14
+ */
15
+ const SDK_EXAMPLES = {
16
+ // Trading workflows
17
+ 'buy-tokens': `
18
+ ## Buying Tokens with SDK
19
+
20
+ \`\`\`typescript
21
+ import { createLaunchpadSDK } from '@gala-chain/launchpad-sdk';
22
+
23
+ async function buyTokens() {
24
+ // 1. Create SDK instance
25
+ const sdk = createLaunchpadSDK({
26
+ wallet: 'your-private-key-or-mnemonic'
27
+ });
28
+
29
+ // 2. Calculate expected amounts FIRST (REQUIRED)
30
+ const calculation = await sdk.calculateBuyAmount({
31
+ tokenName: 'dragnrkti',
32
+ amount: '100', // Spending 100 GALA
33
+ type: 'native' // 'native' = GALA amount, 'exact' = token amount
34
+ });
35
+
36
+ console.log('Expected tokens:', calculation.amount);
37
+ console.log('RBC Fee:', calculation.reverseBondingCurveFee);
38
+ console.log('Transaction fee:', calculation.transactionFee);
39
+
40
+ // 3. Execute buy with slippage protection
41
+ const result = await sdk.buy({
42
+ tokenName: 'dragnrkti',
43
+ amount: '100',
44
+ type: 'native',
45
+ expectedAmount: calculation.amount, // REQUIRED: from step 2
46
+ maxAcceptableReverseBondingCurveFee: calculation.reverseBondingCurveFee, // RECOMMENDED
47
+ slippageToleranceFactor: 0.01 // 1% slippage tolerance (REQUIRED)
48
+ });
49
+
50
+ console.log('Transaction ID:', result.transactionId);
51
+ console.log('GALA spent:', result.inputAmount);
52
+ console.log('Tokens received:', result.outputAmount);
53
+ console.log('Total fees:', result.totalFees);
54
+ }
55
+ \`\`\`
56
+
57
+ **MCP Tool Equivalent:** \`gala_launchpad_buy_tokens\`
58
+ `,
59
+ 'sell-tokens': `
60
+ ## Selling Tokens with SDK
61
+
62
+ \`\`\`typescript
63
+ import { createLaunchpadSDK } from '@gala-chain/launchpad-sdk';
64
+
65
+ async function sellTokens() {
66
+ // 1. Create SDK instance
67
+ const sdk = createLaunchpadSDK({
68
+ wallet: 'your-private-key'
69
+ });
70
+
71
+ // 2. Calculate expected GALA FIRST (REQUIRED)
72
+ const calculation = await sdk.calculateSellAmount({
73
+ tokenName: 'dragnrkti',
74
+ amount: '1000', // Selling 1000 tokens
75
+ type: 'exact' // 'exact' = exact tokens, 'native' = target GALA amount
76
+ });
77
+
78
+ console.log('Expected GALA:', calculation.amount);
79
+ console.log('RBC Fee:', calculation.reverseBondingCurveFee);
80
+
81
+ // 3. Execute sell with slippage protection
82
+ const result = await sdk.sell({
83
+ tokenName: 'dragnrkti',
84
+ amount: '1000',
85
+ type: 'exact',
86
+ expectedAmount: calculation.amount, // REQUIRED: from step 2
87
+ maxAcceptableReverseBondingCurveFee: calculation.reverseBondingCurveFee, // RECOMMENDED
88
+ slippageToleranceFactor: 0.01 // 1% slippage
89
+ });
90
+
91
+ console.log('Tokens sold:', result.inputAmount);
92
+ console.log('GALA received:', result.outputAmount);
93
+ }
94
+ \`\`\`
95
+
96
+ **MCP Tool Equivalent:** \`gala_launchpad_sell_tokens\`
97
+ `,
98
+ 'pool-graduation': `
99
+ ## Pool Graduation with SDK
100
+
101
+ \`\`\`typescript
102
+ import { createLaunchpadSDK } from '@gala-chain/launchpad-sdk';
103
+
104
+ async function graduatePool() {
105
+ const sdk = createLaunchpadSDK({
106
+ wallet: 'your-private-key'
107
+ });
108
+
109
+ // Option 1: Calculate graduation cost first (recommended)
110
+ const calculation = await sdk.calculateBuyAmountForGraduation('dragnrkti');
111
+
112
+ console.log('GALA cost to graduate:', calculation.amount);
113
+ console.log('RBC Fee:', calculation.reverseBondingCurveFee);
114
+ console.log('Transaction fee:', calculation.transactionFee);
115
+
116
+ // Check if you have enough balance
117
+ const balance = await sdk.fetchGalaBalance();
118
+ if (parseFloat(balance.balance) < parseFloat(calculation.amount)) {
119
+ throw new Error('Insufficient GALA balance');
120
+ }
121
+
122
+ // Option 2: One-step graduation (convenience method)
123
+ const result = await sdk.graduateToken({
124
+ tokenName: 'dragnrkti',
125
+ slippageToleranceFactor: 0.01 // Optional: defaults to SDK config
126
+ });
127
+
128
+ console.log('Pool graduated!');
129
+ console.log('Transaction ID:', result.transactionId);
130
+ console.log('Total GALA spent:', result.inputAmount);
131
+ console.log('Tokens received:', result.outputAmount);
132
+ }
133
+ \`\`\`
134
+
135
+ **MCP Tool Equivalents:**
136
+ - \`gala_launchpad_calculate_buy_amount_for_graduation\`
137
+ - \`gala_launchpad_graduate_token\`
138
+ `,
139
+ 'fetch-pools': `
140
+ ## Fetching Pool Data with SDK
141
+
142
+ \`\`\`typescript
143
+ import { createLaunchpadSDK } from '@gala-chain/launchpad-sdk';
144
+
145
+ async function fetchPools() {
146
+ const sdk = createLaunchpadSDK({
147
+ wallet: 'your-private-key'
148
+ });
149
+
150
+ // Fetch recent pools with pagination
151
+ const pools = await sdk.fetchPools({
152
+ type: 'recent',
153
+ limit: 10,
154
+ page: 1
155
+ });
156
+
157
+ console.log(\`Found \${pools.total} pools\`);
158
+ console.log(\`Page \${pools.page} of \${pools.totalPages}\`);
159
+ console.log(\`Has next page: \${pools.hasNext}\`);
160
+
161
+ pools.pools.forEach(pool => {
162
+ console.log(\`\${pool.tokenName}: \${pool.tokenSymbol}\`);
163
+ console.log(\`Creator: \${pool.creatorAddress}\`);
164
+ console.log(\`Created: \${pool.createdAt}\`);
165
+ });
166
+
167
+ // Fetch specific pool details
168
+ const details = await sdk.fetchPoolDetails('dragnrkti');
169
+
170
+ console.log('Sale status:', details.saleStatus);
171
+ console.log('Base price:', details.basePrice);
172
+ console.log('Max supply:', details.maxSupply);
173
+ console.log('Native token quantity:', details.nativeTokenQuantity);
174
+ }
175
+ \`\`\`
176
+
177
+ **MCP Tool Equivalents:**
178
+ - \`gala_launchpad_fetch_pools\`
179
+ - \`gala_launchpad_fetch_pool_details\`
180
+ `,
181
+ 'balances': `
182
+ ## Checking Balances with SDK
183
+
184
+ \`\`\`typescript
185
+ import { createLaunchpadSDK } from '@gala-chain/launchpad-sdk';
186
+
187
+ async function checkBalances() {
188
+ const sdk = createLaunchpadSDK({
189
+ wallet: 'your-private-key'
190
+ });
191
+
192
+ // Check GALA balance
193
+ const galaBalance = await sdk.fetchGalaBalance();
194
+ console.log(\`GALA: \${galaBalance.balance}\`);
195
+ console.log(\`Decimals: \${galaBalance.decimals}\`);
196
+ console.log(\`Last updated: \${galaBalance.lastUpdated.toISOString()}\`);
197
+
198
+ // Check specific token balance
199
+ const tokenBalance = await sdk.fetchTokenBalance({
200
+ tokenName: 'dragnrkti',
201
+ address: sdk.getAddress()
202
+ });
203
+
204
+ console.log(\`Token: \${tokenBalance.quantity}\`);
205
+ console.log(\`USD value: $\${tokenBalance.holdingPriceUsd}\`);
206
+ console.log(\`GALA value: \${tokenBalance.holdingPriceGala}\`);
207
+
208
+ // Check all tokens held
209
+ const portfolio = await sdk.fetchTokensHeld({
210
+ address: sdk.getAddress(),
211
+ limit: 20
212
+ });
213
+
214
+ console.log(\`Holding \${portfolio.total} different tokens\`);
215
+ portfolio.tokens.forEach(token => {
216
+ console.log(\`\${token.name}: \${token.quantity}\`);
217
+ });
218
+ }
219
+ \`\`\`
220
+
221
+ **MCP Tool Equivalents:**
222
+ - \`gala_launchpad_fetch_gala_balance\`
223
+ - \`gala_launchpad_fetch_token_balance\`
224
+ - \`gala_launchpad_fetch_tokens_held\`
225
+ `,
226
+ 'token-creation': `
227
+ ## Creating Tokens with SDK
228
+
229
+ \`\`\`typescript
230
+ import { createLaunchpadSDK } from '@gala-chain/launchpad-sdk';
231
+
232
+ async function launchToken() {
233
+ const sdk = createLaunchpadSDK({
234
+ wallet: 'your-private-key'
235
+ });
236
+
237
+ // 1. Check if name/symbol available
238
+ const nameAvailable = await sdk.isTokenNameAvailable('mytoken');
239
+ const symbolAvailable = await sdk.isTokenSymbolAvailable('MTK');
240
+
241
+ if (!nameAvailable || !symbolAvailable) {
242
+ throw new Error('Name or symbol already taken');
243
+ }
244
+
245
+ // 2. Check launch fee
246
+ const launchFee = await sdk.fetchLaunchTokenFee();
247
+ console.log(\`Launch fee: \${launchFee} GALA\`);
248
+
249
+ // 3. Upload token image (Node.js only)
250
+ const imageUpload = await sdk.uploadTokenImage({
251
+ tokenName: 'mytoken',
252
+ imagePath: '/path/to/image.png'
253
+ });
254
+
255
+ // 4. Launch the token
256
+ const result = await sdk.launchToken({
257
+ tokenName: 'mytoken',
258
+ tokenSymbol: 'MTK',
259
+ tokenDescription: 'My awesome token',
260
+ tokenImage: imageUpload.imageUrl,
261
+ websiteUrl: 'https://mytoken.com',
262
+ twitterUrl: 'https://twitter.com/mytoken',
263
+ preBuyQuantity: '100' // Optional: pre-buy with GALA
264
+ });
265
+
266
+ console.log('Token launched!');
267
+ console.log('Transaction ID:', result.transactionId);
268
+
269
+ // Get frontend URL
270
+ const url = sdk.getUrlByTokenName('mytoken');
271
+ console.log(\`View at: \${url}\`);
272
+ }
273
+ \`\`\`
274
+
275
+ **MCP Tool Equivalents:**
276
+ - \`gala_launchpad_check_token_name\`
277
+ - \`gala_launchpad_check_token_symbol\`
278
+ - \`gala_launchpad_fetch_launch_token_fee\`
279
+ - \`gala_launchpad_upload_token_image\`
280
+ - \`gala_launchpad_launch_token\`
281
+ - \`gala_launchpad_get_url_by_token_name\`
282
+ `,
283
+ 'multi-wallet': `
284
+ ## Multi-Wallet Support with SDK
285
+
286
+ \`\`\`typescript
287
+ import { createLaunchpadSDK, createWallet } from '@gala-chain/launchpad-sdk';
288
+
289
+ async function multiWalletExample() {
290
+ // Main SDK with your wallet
291
+ const sdk = createLaunchpadSDK({
292
+ wallet: 'your-main-private-key'
293
+ });
294
+
295
+ // Create a test wallet
296
+ const testWallet = createWallet();
297
+ console.log('Test wallet:', testWallet.address);
298
+
299
+ // 1. Fund test wallet from main wallet
300
+ await sdk.transferGala({
301
+ recipientAddress: testWallet.address,
302
+ amount: '1000'
303
+ });
304
+
305
+ // 2. Have test wallet buy tokens (using privateKey override)
306
+ const buyCalc = await sdk.calculateBuyAmount({
307
+ tokenName: 'dragnrkti',
308
+ amount: '100',
309
+ type: 'native'
310
+ });
311
+
312
+ const buyResult = await sdk.buy({
313
+ tokenName: 'dragnrkti',
314
+ amount: '100',
315
+ type: 'native',
316
+ expectedAmount: buyCalc.amount,
317
+ slippageToleranceFactor: 0.01,
318
+ privateKey: testWallet.privateKey // Override to use test wallet
319
+ });
320
+
321
+ console.log('Test wallet bought tokens');
322
+
323
+ // 3. Have test wallet post comment
324
+ await sdk.postComment({
325
+ tokenName: 'dragnrkti',
326
+ content: 'Great project!',
327
+ privateKey: testWallet.privateKey // Test wallet posts
328
+ });
329
+
330
+ // 4. Check balances for both wallets
331
+ const mainBalance = await sdk.fetchGalaBalance(); // Main wallet
332
+ const testBalance = await sdk.fetchGalaBalance(testWallet.address); // Test wallet
333
+
334
+ console.log(\`Main wallet: \${mainBalance.balance} GALA\`);
335
+ console.log(\`Test wallet: \${testBalance.balance} GALA\`);
336
+ }
337
+ \`\`\`
338
+
339
+ **Key Points:**
340
+ - All signing operations support \`privateKey\` parameter
341
+ - Creates temporary SDK instance internally
342
+ - Supports: buy, sell, launchToken, transfers, comments, profile updates
343
+ `,
344
+ 'transfers': `
345
+ ## Token Transfers with SDK
346
+
347
+ \`\`\`typescript
348
+ import { createLaunchpadSDK } from '@gala-chain/launchpad-sdk';
349
+
350
+ async function transferTokens() {
351
+ const sdk = createLaunchpadSDK({
352
+ wallet: 'your-private-key'
353
+ });
354
+
355
+ // Transfer GALA tokens
356
+ const galaTransfer = await sdk.transferGala({
357
+ recipientAddress: '0x1234...', // or 'eth|1234...'
358
+ amount: '100',
359
+ uniqueKey: 'galaconnect-operation-my-transfer-123' // Optional idempotency
360
+ });
361
+
362
+ console.log('GALA transfer ID:', galaTransfer.transactionId);
363
+ console.log('Status:', galaTransfer.status);
364
+
365
+ // Transfer launchpad tokens
366
+ const tokenTransfer = await sdk.transferToken({
367
+ to: 'eth|5678...',
368
+ tokenName: 'dragnrkti',
369
+ amount: '1000', // Token amount
370
+ uniqueKey: 'galaconnect-operation-token-456'
371
+ });
372
+
373
+ console.log('Token transfer ID:', tokenTransfer.transactionId);
374
+ }
375
+ \`\`\`
376
+
377
+ **Features:**
378
+ - EIP-712 signatures for security
379
+ - Supports both \`0x\` and \`eth|\` address formats
380
+ - Optional idempotency keys prevent duplicates
381
+ - Comprehensive validation
382
+
383
+ **MCP Tool Equivalents:**
384
+ - \`gala_launchpad_transfer_gala\`
385
+ - \`gala_launchpad_transfer_token\`
386
+ `,
387
+ 'error-handling': `
388
+ ## Error Handling with SDK
389
+
390
+ \`\`\`typescript
391
+ import {
392
+ createLaunchpadSDK,
393
+ ValidationError,
394
+ NetworkError,
395
+ TransactionError,
396
+ TokenNotFoundError
397
+ } from '@gala-chain/launchpad-sdk';
398
+
399
+ async function errorHandlingExample() {
400
+ const sdk = createLaunchpadSDK({
401
+ wallet: 'your-private-key'
402
+ });
403
+
404
+ try {
405
+ // Attempt trade
406
+ const result = await sdk.buy({
407
+ tokenName: 'dragnrkti',
408
+ amount: '100',
409
+ type: 'native',
410
+ expectedAmount: '5000',
411
+ slippageToleranceFactor: 0.01
412
+ });
413
+
414
+ console.log('Success:', result.transactionId);
415
+
416
+ } catch (error) {
417
+ if (error instanceof ValidationError) {
418
+ console.error('Invalid input:', error.message);
419
+ console.error('Field:', error.field);
420
+ console.error('Code:', error.code);
421
+
422
+ } else if (error instanceof TokenNotFoundError) {
423
+ console.error('Token does not exist:', error.tokenName);
424
+
425
+ } catch if (error instanceof NetworkError) {
426
+ console.error('Network issue:', error.message);
427
+ console.error('Status code:', error.statusCode);
428
+
429
+ } else if (error instanceof TransactionError) {
430
+ console.error('Transaction failed:', error.message);
431
+ console.error('Transaction ID:', error.transactionId);
432
+
433
+ } else {
434
+ console.error('Unexpected error:', error);
435
+ }
436
+ }
437
+ }
438
+ \`\`\`
439
+
440
+ **Error Types:**
441
+ - \`ValidationError\` - Invalid input parameters
442
+ - \`NetworkError\` - HTTP/network failures
443
+ - \`TransactionError\` - Blockchain transaction failures
444
+ - \`TokenNotFoundError\` - Token doesn't exist
445
+ - \`ConfigurationError\` - SDK misconfiguration
446
+ - \`WebSocketError\` - Real-time connection issues
447
+ `,
448
+ 'installation': `
449
+ ## Installing and Importing SDK
450
+
451
+ ### NPM Installation
452
+
453
+ \`\`\`bash
454
+ # Install SDK
455
+ npm install @gala-chain/launchpad-sdk
456
+
457
+ # Install peer dependencies
458
+ npm install ethers@^6.15.0 @gala-chain/api@^2.4.3 @gala-chain/connect@^2.4.3 \\
459
+ socket.io-client@^4.8.1 axios@^1.12.2 bignumber.js@^9.1.2 zod@^3.25.76
460
+ \`\`\`
461
+
462
+ ### Import Patterns
463
+
464
+ \`\`\`typescript
465
+ // Main SDK class
466
+ import { LaunchpadSDK } from '@gala-chain/launchpad-sdk';
467
+
468
+ // Helper functions (recommended)
469
+ import {
470
+ createLaunchpadSDK,
471
+ createTestLaunchpadSDK,
472
+ createWallet,
473
+ validateWalletInput
474
+ } from '@gala-chain/launchpad-sdk';
475
+
476
+ // Error types
477
+ import {
478
+ ValidationError,
479
+ NetworkError,
480
+ TransactionError,
481
+ TokenNotFoundError
482
+ } from '@gala-chain/launchpad-sdk';
483
+
484
+ // Type definitions
485
+ import type {
486
+ PoolData,
487
+ TradeResult,
488
+ TokenBalanceInfo,
489
+ BuyTokenOptions,
490
+ SellTokenOptions
491
+ } from '@gala-chain/launchpad-sdk';
492
+ \`\`\`
493
+
494
+ ### Environment Configuration
495
+
496
+ \`\`\`typescript
497
+ // Development (default)
498
+ const sdk = createLaunchpadSDK({
499
+ wallet: 'your-private-key',
500
+ config: {
501
+ baseUrl: 'https://lpad-backend-dev1.defi.gala.com',
502
+ debug: true
503
+ }
504
+ });
505
+
506
+ // Production
507
+ const sdk = createLaunchpadSDK({
508
+ wallet: 'your-private-key',
509
+ config: {
510
+ baseUrl: 'https://lpad-backend-prod1.defi.gala.com',
511
+ debug: false,
512
+ timeout: 60000
513
+ }
514
+ });
515
+ \`\`\`
516
+ `,
517
+ 'mcp-to-sdk-mapping': `
518
+ ## MCP Tool to SDK Method Mapping
519
+
520
+ ### Trading Operations
521
+ | MCP Tool | SDK Method | Notes |
522
+ |----------|------------|-------|
523
+ | \`gala_launchpad_calculate_buy_amount\` | \`sdk.calculateBuyAmount(options)\` | Get quote before buying |
524
+ | \`gala_launchpad_calculate_sell_amount\` | \`sdk.calculateSellAmount(options)\` | Get quote before selling |
525
+ | \`gala_launchpad_buy_tokens\` | \`sdk.buy(options)\` | Execute token purchase |
526
+ | \`gala_launchpad_sell_tokens\` | \`sdk.sell(options)\` | Execute token sale |
527
+ | \`gala_launchpad_graduate_token\` | \`sdk.graduateToken(options)\` | One-step pool graduation |
528
+
529
+ ### Pool Management
530
+ | MCP Tool | SDK Method | Notes |
531
+ |----------|------------|-------|
532
+ | \`gala_launchpad_fetch_pools\` | \`sdk.fetchPools(options)\` | List pools with filtering |
533
+ | \`gala_launchpad_fetch_pool_details\` | \`sdk.fetchPoolDetails(tokenName)\` | Get specific pool data |
534
+ | \`gala_launchpad_fetch_token_distribution\` | \`sdk.fetchTokenDistribution(tokenName)\` | Holder distribution |
535
+ | \`gala_launchpad_fetch_token_badges\` | \`sdk.fetchTokenBadges(tokenName)\` | Achievement badges |
536
+
537
+ ### Balance & Portfolio
538
+ | MCP Tool | SDK Method | Notes |
539
+ |----------|------------|-------|
540
+ | \`gala_launchpad_fetch_gala_balance\` | \`sdk.fetchGalaBalance(address?)\` | GALA balance |
541
+ | \`gala_launchpad_fetch_token_balance\` | \`sdk.fetchTokenBalance(options)\` | Specific token balance |
542
+ | \`gala_launchpad_fetch_tokens_held\` | \`sdk.fetchTokensHeld(options)\` | Portfolio holdings |
543
+ | \`gala_launchpad_fetch_tokens_created\` | \`sdk.fetchTokensCreated(options)\` | Created tokens |
544
+
545
+ ### Token Creation
546
+ | MCP Tool | SDK Method | Notes |
547
+ |----------|------------|-------|
548
+ | \`gala_launchpad_fetch_launch_token_fee\` | \`sdk.fetchLaunchTokenFee()\` | Get launch cost |
549
+ | \`gala_launchpad_check_token_name\` | \`sdk.isTokenNameAvailable(name)\` | Check name |
550
+ | \`gala_launchpad_check_token_symbol\` | \`sdk.isTokenSymbolAvailable(symbol)\` | Check symbol |
551
+ | \`gala_launchpad_launch_token\` | \`sdk.launchToken(data)\` | Create token |
552
+ | \`gala_launchpad_upload_token_image\` | \`sdk.uploadTokenImage(options)\` | Upload image |
553
+
554
+ ### Transfers & Social
555
+ | MCP Tool | SDK Method | Notes |
556
+ |----------|------------|-------|
557
+ | \`gala_launchpad_transfer_gala\` | \`sdk.transferGala(options)\` | Transfer GALA |
558
+ | \`gala_launchpad_transfer_token\` | \`sdk.transferToken(options)\` | Transfer tokens |
559
+ | \`gala_launchpad_post_comment\` | \`sdk.postComment(options)\` | Post comment |
560
+ | \`gala_launchpad_fetch_comments\` | \`sdk.fetchComments(options)\` | Get comments |
561
+
562
+ ### Utilities
563
+ | MCP Tool | SDK Method | Notes |
564
+ |----------|------------|-------|
565
+ | \`gala_launchpad_create_wallet\` | \`createWallet()\` | Generate wallet |
566
+ | \`gala_launchpad_get_address\` | \`sdk.getAddress()\` | Get backend format |
567
+ | \`gala_launchpad_get_ethereum_address\` | \`sdk.getEthereumAddress()\` | Get 0x format |
568
+ | \`gala_launchpad_get_url_by_token_name\` | \`sdk.getUrlByTokenName(name)\` | Frontend URL |
569
+
570
+ **Key Difference:** MCP tools return \`{ success: true, data: {...} }\`, SDK methods return direct result objects.
571
+ `,
572
+ };
573
+ /**
574
+ * SDK Usage Explanation Tool
575
+ */
576
+ exports.explainSdkUsageTool = {
577
+ name: 'gala_launchpad_explain_sdk_usage',
578
+ description: `Get detailed SDK code examples and explanations for using the Gala Launchpad SDK directly.
579
+
580
+ This tool provides complete, working code examples showing how to use the SDK instead of MCP tools.
581
+ Perfect for developers who want to integrate the SDK into their applications.
582
+
583
+ Available topics:
584
+ - 'buy-tokens' - Complete buying workflow with calculation and execution
585
+ - 'sell-tokens' - Complete selling workflow with slippage protection
586
+ - 'pool-graduation' - Graduate a bonding curve pool
587
+ - 'fetch-pools' - Query pool data and details
588
+ - 'balances' - Check GALA and token balances
589
+ - 'token-creation' - Launch new tokens
590
+ - 'multi-wallet' - Use multiple wallets (privateKey override pattern)
591
+ - 'transfers' - Transfer GALA and tokens between wallets
592
+ - 'error-handling' - Handle errors and exceptions
593
+ - 'installation' - Install and configure SDK
594
+ - 'mcp-to-sdk-mapping' - Complete mapping of MCP tools to SDK methods
595
+
596
+ Returns runnable TypeScript code examples with explanations.`,
597
+ inputSchema: {
598
+ type: 'object',
599
+ properties: {
600
+ topic: {
601
+ type: 'string',
602
+ enum: [
603
+ 'buy-tokens',
604
+ 'sell-tokens',
605
+ 'pool-graduation',
606
+ 'fetch-pools',
607
+ 'balances',
608
+ 'token-creation',
609
+ 'multi-wallet',
610
+ 'transfers',
611
+ 'error-handling',
612
+ 'installation',
613
+ 'mcp-to-sdk-mapping',
614
+ ],
615
+ description: 'The SDK usage topic to explain',
616
+ },
617
+ },
618
+ required: ['topic'],
619
+ },
620
+ handler: (0, error_handler_js_1.withErrorHandling)(async (_sdk, args) => {
621
+ const example = SDK_EXAMPLES[args.topic];
622
+ if (!example) {
623
+ throw new Error(`Unknown topic: ${args.topic}`);
624
+ }
625
+ return (0, response_formatter_js_1.formatSuccess)({
626
+ topic: args.topic,
627
+ explanation: example,
628
+ sdkVersion: '3.7.5',
629
+ packageName: '@gala-chain/launchpad-sdk',
630
+ documentation: 'https://www.npmjs.com/package/@gala-chain/launchpad-sdk',
631
+ });
632
+ }),
633
+ };
634
+ //# sourceMappingURL=explainSdkUsage.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"explainSdkUsage.js","sourceRoot":"","sources":["../../../src/tools/utils/explainSdkUsage.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAGH,mEAAiE;AACjE,6EAAkE;AAElE;;GAEG;AACH,MAAM,YAAY,GAAG;IACnB,oBAAoB;IACpB,YAAY,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAyCf;IAEC,aAAa,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAsChB;IAEC,iBAAiB,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAwCpB;IAEC,aAAa,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAyChB;IAEC,UAAU,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA4Cb;IAEC,gBAAgB,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAwDnB;IAEC,cAAc,EAAE;;;;;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YACnB,KAAK,EAAE,IAAI,CAAC,KAAK;YACjB,WAAW,EAAE,OAAO;YACpB,UAAU,EAAE,OAAO;YACnB,WAAW,EAAE,2BAA2B;YACxC,aAAa,EAAE,yDAAyD;SACzE,CAAC,CAAC;IACL,CAAC,CAAC;CACH,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/tools/utils/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAQH,eAAO,MAAM,YAAY,wCAMxB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/tools/utils/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AASH,eAAO,MAAM,YAAY,wCAOxB,CAAC"}
@@ -9,11 +9,13 @@ const getAddress_js_1 = require("./getAddress.js");
9
9
  const getEthereumAddress_js_1 = require("./getEthereumAddress.js");
10
10
  const getConfig_js_1 = require("./getConfig.js");
11
11
  const getUrlByTokenName_js_1 = require("./getUrlByTokenName.js");
12
+ const explainSdkUsage_js_1 = require("./explainSdkUsage.js");
12
13
  exports.utilityTools = [
13
14
  createWallet_js_1.createWalletTool,
14
15
  getAddress_js_1.getAddressTool,
15
16
  getEthereumAddress_js_1.getEthereumAddressTool,
16
17
  getConfig_js_1.getConfigTool,
17
18
  getUrlByTokenName_js_1.getUrlByTokenNameTool,
19
+ explainSdkUsage_js_1.explainSdkUsageTool,
18
20
  ];
19
21
  //# 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;AAElD,QAAA,YAAY,GAAG;IAC1B,kCAAgB;IAChB,8BAAc;IACd,8CAAsB;IACtB,4BAAa;IACb,4CAAqB;CACtB,CAAC"}
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;AAE9C,QAAA,YAAY,GAAG;IAC1B,kCAAgB;IAChB,8BAAc;IACd,8CAAsB;IACtB,4BAAa;IACb,4CAAqB;IACrB,wCAAmB;CACpB,CAAC"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@gala-chain/launchpad-mcp-server",
3
- "version": "1.2.19",
4
- "description": "MCP server for Gala Launchpad SDK with 40 tools - AI agents can interact with Gala Launchpad",
3
+ "version": "1.2.21",
4
+ "description": "MCP server for Gala Launchpad SDK with 41 tools - AI agents can interact with Gala Launchpad and learn SDK usage",
5
5
  "main": "dist/index.js",
6
6
  "bin": {
7
7
  "gala-launchpad-mcp": "./dist/index.js"
@@ -56,7 +56,7 @@
56
56
  "registry": "https://registry.npmjs.org/"
57
57
  },
58
58
  "dependencies": {
59
- "@gala-chain/launchpad-sdk": "^3.7.5",
59
+ "@gala-chain/launchpad-sdk": "^3.7.6",
60
60
  "@modelcontextprotocol/sdk": "^0.5.0",
61
61
  "ethers": "^6.15.0",
62
62
  "@gala-chain/api": "^2.4.3",
@@ -0,0 +1,73 @@
1
+ #!/usr/bin/env node
2
+ import { spawn } from 'child_process';
3
+
4
+ const PRIVATE_KEY = '0x1234567890123456789012345678901234567890123456789012345678901234';
5
+
6
+ const serverProcess = spawn('node', ['dist/index.js'], {
7
+ env: { ...process.env, PRIVATE_KEY }
8
+ });
9
+
10
+ let responseBuffer = '';
11
+
12
+ serverProcess.stdout.on('data', (data) => {
13
+ responseBuffer += data.toString();
14
+
15
+ // Try to parse JSON-RPC messages
16
+ const lines = responseBuffer.split('\n');
17
+ responseBuffer = lines.pop(); // Keep incomplete line
18
+
19
+ for (const line of lines) {
20
+ if (!line.trim()) continue;
21
+ try {
22
+ const response = JSON.parse(line);
23
+ if (response.result?.success) {
24
+ console.log('\nāœ… explainSdkUsage Tool Response:');
25
+ console.log('Topic:', response.result.data.topic);
26
+ console.log('SDK Version:', response.result.data.sdkVersion);
27
+ console.log('\nExplanation Preview:');
28
+ console.log(response.result.data.explanation.substring(0, 500) + '...\n');
29
+ serverProcess.kill();
30
+ process.exit(0);
31
+ }
32
+ } catch (e) {
33
+ // Ignore parse errors
34
+ }
35
+ }
36
+ });
37
+
38
+ serverProcess.stderr.on('data', (data) => {
39
+ console.error('Error:', data.toString());
40
+ });
41
+
42
+ // Initialize
43
+ serverProcess.stdin.write(JSON.stringify({
44
+ jsonrpc: '2.0',
45
+ id: 1,
46
+ method: 'initialize',
47
+ params: {
48
+ protocolVersion: '2024-11-05',
49
+ capabilities: {}
50
+ }
51
+ }) + '\n');
52
+
53
+ // Wait a bit then call the tool
54
+ setTimeout(() => {
55
+ serverProcess.stdin.write(JSON.stringify({
56
+ jsonrpc: '2.0',
57
+ id: 2,
58
+ method: 'tools/call',
59
+ params: {
60
+ name: 'gala_launchpad_explain_sdk_usage',
61
+ arguments: {
62
+ topic: 'buy-tokens'
63
+ }
64
+ }
65
+ }) + '\n');
66
+ }, 1000);
67
+
68
+ // Timeout after 5 seconds
69
+ setTimeout(() => {
70
+ console.error('āŒ Test timed out');
71
+ serverProcess.kill();
72
+ process.exit(1);
73
+ }, 5000);