@gala-chain/launchpad-mcp-server 1.19.2 → 1.21.4
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/README.md +3 -3
- package/dist/generated/version.d.ts +1 -1
- package/dist/generated/version.js +1 -1
- package/dist/prompts/index.d.ts +3 -2
- package/dist/prompts/index.d.ts.map +1 -1
- package/dist/prompts/index.js +6 -1
- package/dist/prompts/index.js.map +1 -1
- package/dist/prompts/liquidity-positions.d.ts +35 -0
- package/dist/prompts/liquidity-positions.d.ts.map +1 -0
- package/dist/prompts/liquidity-positions.js +260 -0
- package/dist/prompts/liquidity-positions.js.map +1 -0
- package/dist/tools/dex/index.d.ts +1 -1
- package/dist/tools/dex/index.d.ts.map +1 -1
- package/dist/tools/dex/index.js +4 -2
- package/dist/tools/dex/index.js.map +1 -1
- package/dist/tools/dex/liquidity-positions.d.ts +20 -0
- package/dist/tools/dex/liquidity-positions.d.ts.map +1 -0
- package/dist/tools/dex/liquidity-positions.js +512 -0
- package/dist/tools/dex/liquidity-positions.js.map +1 -0
- package/dist/tools/index.d.ts +1 -1
- package/dist/tools/index.js +2 -2
- package/dist/tools/utils/explainSdkUsage.d.ts.map +1 -1
- package/dist/tools/utils/explainSdkUsage.js +52 -121
- package/dist/tools/utils/explainSdkUsage.js.map +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -4,8 +4,8 @@ MCP (Model Context Protocol) server for Gala Launchpad SDK - Enables AI agents t
|
|
|
4
4
|
|
|
5
5
|
## 🚀 Features
|
|
6
6
|
|
|
7
|
-
- **
|
|
8
|
-
- **
|
|
7
|
+
- **70 AI-accessible tools** for complete Gala Launchpad integration (includes 8 liquidity position tools, 4 price history tools, 3 wallet management tools, 5 GSwap DEX trading tools)
|
|
8
|
+
- **23 slash commands** (prompts) for quick access to common workflows
|
|
9
9
|
- **Type-safe** - Full TypeScript support with validated inputs
|
|
10
10
|
- **Production-ready** - Built on [@gala-chain/launchpad-sdk ](https://www.npmjs.com/package/@gala-chain/launchpad-sdk)
|
|
11
11
|
- **Easy setup** - Works with Claude Desktop and other MCP clients
|
|
@@ -98,7 +98,7 @@ Use the wallet management tools to upgrade or switch wallets at runtime:
|
|
|
98
98
|
- `gala_launchpad_set_wallet` - Upgrade from read-only to full-access mode
|
|
99
99
|
- `gala_launchpad_get_wallet` - Retrieve wallet information
|
|
100
100
|
|
|
101
|
-
## 🛠️ Available Tools (
|
|
101
|
+
## 🛠️ Available Tools (70 Total)
|
|
102
102
|
|
|
103
103
|
### Pool Management (17 tools)
|
|
104
104
|
- `gala_launchpad_fetch_pools` - Fetch token pools with filtering
|
package/dist/prompts/index.d.ts
CHANGED
|
@@ -10,6 +10,7 @@ import { utilityPrompts } from './utility.js';
|
|
|
10
10
|
import { creationPrompts } from './create-token.js';
|
|
11
11
|
import { discoveryPrompts } from './discover-tokens.js';
|
|
12
12
|
import { dexTradingPrompts } from './dex-trading.js';
|
|
13
|
+
import { liquidityPositionPrompts } from './liquidity-positions.js';
|
|
13
14
|
import type { MCPPrompt } from '../types/mcp.js';
|
|
14
15
|
/**
|
|
15
16
|
* All available prompts
|
|
@@ -70,7 +71,7 @@ export declare function hasPrompt(name: string): boolean;
|
|
|
70
71
|
* // Returns [dexSwapPrompt]
|
|
71
72
|
* ```
|
|
72
73
|
*/
|
|
73
|
-
export declare function getPromptsByCategory(category: 'trading' | 'portfolio' | 'analysis' | 'creation' | 'discovery' | 'dex' | 'utility'): MCPPrompt[];
|
|
74
|
+
export declare function getPromptsByCategory(category: 'trading' | 'portfolio' | 'analysis' | 'creation' | 'discovery' | 'dex' | 'liquidity' | 'utility'): MCPPrompt[];
|
|
74
75
|
/**
|
|
75
76
|
* Get prompt count
|
|
76
77
|
*
|
|
@@ -85,5 +86,5 @@ export declare function getPromptCount(): number;
|
|
|
85
86
|
/**
|
|
86
87
|
* Export individual prompt categories for documentation
|
|
87
88
|
*/
|
|
88
|
-
export { tradingPrompts, portfolioPrompts, analysisPrompts, creationPrompts, discoveryPrompts, dexTradingPrompts, utilityPrompts, };
|
|
89
|
+
export { tradingPrompts, portfolioPrompts, analysisPrompts, creationPrompts, discoveryPrompts, dexTradingPrompts, liquidityPositionPrompts, utilityPrompts, };
|
|
89
90
|
//# 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,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAC9C,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AACxD,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAEjD;;GAEG;AACH,eAAO,MAAM,OAAO,EAAE,SAAS,
|
|
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,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AACxD,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,EAAE,wBAAwB,EAAE,MAAM,0BAA0B,CAAC;AACpE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAEjD;;GAEG;AACH,eAAO,MAAM,OAAO,EAAE,SAAS,EAS9B,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;;;;;;;;;;;;;GAaG;AACH,wBAAgB,oBAAoB,CAClC,QAAQ,EAAE,SAAS,GAAG,WAAW,GAAG,UAAU,GAAG,UAAU,GAAG,WAAW,GAAG,KAAK,GAAG,WAAW,GAAG,SAAS,GAC1G,SAAS,EAAE,CAqBb;AAED;;;;;;;;;GASG;AACH,wBAAgB,cAAc,IAAI,MAAM,CAEvC;AAED;;GAEG;AACH,OAAO,EACL,cAAc,EACd,gBAAgB,EAChB,eAAe,EACf,eAAe,EACf,gBAAgB,EAChB,iBAAiB,EACjB,wBAAwB,EACxB,cAAc,GACf,CAAC"}
|
package/dist/prompts/index.js
CHANGED
|
@@ -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.utilityPrompts = exports.dexTradingPrompts = exports.discoveryPrompts = exports.creationPrompts = exports.analysisPrompts = exports.portfolioPrompts = exports.tradingPrompts = exports.prompts = void 0;
|
|
8
|
+
exports.utilityPrompts = exports.liquidityPositionPrompts = exports.dexTradingPrompts = exports.discoveryPrompts = exports.creationPrompts = 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;
|
|
@@ -25,6 +25,8 @@ const discover_tokens_js_1 = require("./discover-tokens.js");
|
|
|
25
25
|
Object.defineProperty(exports, "discoveryPrompts", { enumerable: true, get: function () { return discover_tokens_js_1.discoveryPrompts; } });
|
|
26
26
|
const dex_trading_js_1 = require("./dex-trading.js");
|
|
27
27
|
Object.defineProperty(exports, "dexTradingPrompts", { enumerable: true, get: function () { return dex_trading_js_1.dexTradingPrompts; } });
|
|
28
|
+
const liquidity_positions_js_1 = require("./liquidity-positions.js");
|
|
29
|
+
Object.defineProperty(exports, "liquidityPositionPrompts", { enumerable: true, get: function () { return liquidity_positions_js_1.liquidityPositionPrompts; } });
|
|
28
30
|
/**
|
|
29
31
|
* All available prompts
|
|
30
32
|
*/
|
|
@@ -35,6 +37,7 @@ exports.prompts = [
|
|
|
35
37
|
...create_token_js_1.creationPrompts,
|
|
36
38
|
...discover_tokens_js_1.discoveryPrompts,
|
|
37
39
|
...dex_trading_js_1.dexTradingPrompts,
|
|
40
|
+
...liquidity_positions_js_1.liquidityPositionPrompts,
|
|
38
41
|
...utility_js_1.utilityPrompts,
|
|
39
42
|
];
|
|
40
43
|
/**
|
|
@@ -117,6 +120,8 @@ function getPromptsByCategory(category) {
|
|
|
117
120
|
return discover_tokens_js_1.discoveryPrompts;
|
|
118
121
|
case 'dex':
|
|
119
122
|
return dex_trading_js_1.dexTradingPrompts;
|
|
123
|
+
case 'liquidity':
|
|
124
|
+
return liquidity_positions_js_1.liquidityPositionPrompts;
|
|
120
125
|
case 'utility':
|
|
121
126
|
return utility_js_1.utilityPrompts;
|
|
122
127
|
default:
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/prompts/index.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/prompts/index.ts"],"names":[],"mapp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;;;;;;;;;;;;;GAaG;AACH,SAAgB,oBAAoB,CAClC,QAA2G;IAE3G,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,UAAU;YACb,OAAO,iCAAe,CAAC;QACzB,KAAK,WAAW;YACd,OAAO,qCAAgB,CAAC;QAC1B,KAAK,KAAK;YACR,OAAO,kCAAiB,CAAC;QAC3B,KAAK,WAAW;YACd,OAAO,iDAAwB,CAAC;QAClC,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,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* DEX Liquidity Position Prompts
|
|
3
|
+
*
|
|
4
|
+
* Slash commands for managing liquidity positions on GalaSwap DEX
|
|
5
|
+
*/
|
|
6
|
+
import type { MCPPrompt } from '../types/mcp.js';
|
|
7
|
+
/**
|
|
8
|
+
* View My Liquidity Positions - List all open LP positions
|
|
9
|
+
*
|
|
10
|
+
* This prompt shows all open liquidity positions for the authenticated wallet.
|
|
11
|
+
*/
|
|
12
|
+
export declare const myPositionsPrompt: MCPPrompt;
|
|
13
|
+
/**
|
|
14
|
+
* Add Liquidity - Create new LP position with guided workflow
|
|
15
|
+
*
|
|
16
|
+
* Guides through adding liquidity to a pool with price range selection
|
|
17
|
+
*/
|
|
18
|
+
export declare const addLiquidityPrompt: MCPPrompt;
|
|
19
|
+
/**
|
|
20
|
+
* Remove Liquidity - Close or reduce LP position
|
|
21
|
+
*
|
|
22
|
+
* Guides through removing liquidity from an existing position
|
|
23
|
+
*/
|
|
24
|
+
export declare const removeLiquidityPrompt: MCPPrompt;
|
|
25
|
+
/**
|
|
26
|
+
* Collect Fees - Harvest accumulated trading fees
|
|
27
|
+
*
|
|
28
|
+
* Guides through collecting accumulated fees from a position
|
|
29
|
+
*/
|
|
30
|
+
export declare const collectFeesPrompt: MCPPrompt;
|
|
31
|
+
/**
|
|
32
|
+
* Export all liquidity position prompts
|
|
33
|
+
*/
|
|
34
|
+
export declare const liquidityPositionPrompts: MCPPrompt[];
|
|
35
|
+
//# sourceMappingURL=liquidity-positions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"liquidity-positions.d.ts","sourceRoot":"","sources":["../../src/prompts/liquidity-positions.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAGjD;;;;GAIG;AACH,eAAO,MAAM,iBAAiB,EAAE,SAmC/B,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,kBAAkB,EAAE,SAqFhC,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,qBAAqB,EAAE,SAsDnC,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,iBAAiB,EAAE,SAkD/B,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,wBAAwB,EAAE,SAAS,EAK/C,CAAC"}
|
|
@@ -0,0 +1,260 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* DEX Liquidity Position Prompts
|
|
4
|
+
*
|
|
5
|
+
* Slash commands for managing liquidity positions on GalaSwap DEX
|
|
6
|
+
*/
|
|
7
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
+
exports.liquidityPositionPrompts = exports.collectFeesPrompt = exports.removeLiquidityPrompt = exports.addLiquidityPrompt = exports.myPositionsPrompt = void 0;
|
|
9
|
+
const validation_js_1 = require("../utils/validation.js");
|
|
10
|
+
/**
|
|
11
|
+
* View My Liquidity Positions - List all open LP positions
|
|
12
|
+
*
|
|
13
|
+
* This prompt shows all open liquidity positions for the authenticated wallet.
|
|
14
|
+
*/
|
|
15
|
+
exports.myPositionsPrompt = {
|
|
16
|
+
name: 'galachain-launchpad:my-positions',
|
|
17
|
+
description: 'View all your open liquidity positions on GalaSwap DEX with details about each position',
|
|
18
|
+
arguments: [],
|
|
19
|
+
handler: () => {
|
|
20
|
+
return [
|
|
21
|
+
{
|
|
22
|
+
role: 'user',
|
|
23
|
+
content: {
|
|
24
|
+
type: 'text',
|
|
25
|
+
text: `I want to view all my open liquidity positions on GalaSwap DEX.
|
|
26
|
+
|
|
27
|
+
**Action:**
|
|
28
|
+
Show me all my liquidity positions with the following information for each:
|
|
29
|
+
- Position ID
|
|
30
|
+
- Token pair (token0/token1)
|
|
31
|
+
- Fee tier
|
|
32
|
+
- Current liquidity amount
|
|
33
|
+
- Token amounts locked
|
|
34
|
+
- Accumulated trading fees
|
|
35
|
+
|
|
36
|
+
**Workflow:**
|
|
37
|
+
1. Fetch all my open positions using gala_launchpad_get_user_liquidity_positions
|
|
38
|
+
2. Display each position with key details
|
|
39
|
+
3. Show total summary (number of positions, total accumulated fees)
|
|
40
|
+
|
|
41
|
+
Please use the following MCP tools:
|
|
42
|
+
- gala_launchpad_get_user_liquidity_positions: Retrieve all open positions for my wallet
|
|
43
|
+
|
|
44
|
+
Proceed with fetching my positions.`,
|
|
45
|
+
},
|
|
46
|
+
},
|
|
47
|
+
];
|
|
48
|
+
},
|
|
49
|
+
};
|
|
50
|
+
/**
|
|
51
|
+
* Add Liquidity - Create new LP position with guided workflow
|
|
52
|
+
*
|
|
53
|
+
* Guides through adding liquidity to a pool with price range selection
|
|
54
|
+
*/
|
|
55
|
+
exports.addLiquidityPrompt = {
|
|
56
|
+
name: 'galachain-launchpad:add-liquidity',
|
|
57
|
+
description: 'Add liquidity to a GalaSwap DEX pool. Guides through selecting token pair, price range, and amounts.',
|
|
58
|
+
arguments: [
|
|
59
|
+
{
|
|
60
|
+
name: 'token0',
|
|
61
|
+
description: 'First token symbol (e.g., GALA)',
|
|
62
|
+
required: true,
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
name: 'token1',
|
|
66
|
+
description: 'Second token symbol (e.g., GUSDC)',
|
|
67
|
+
required: true,
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
name: 'amount0',
|
|
71
|
+
description: 'Amount of token0 to provide (e.g., 1000)',
|
|
72
|
+
required: true,
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
name: 'amount1',
|
|
76
|
+
description: 'Amount of token1 to provide (e.g., 1000)',
|
|
77
|
+
required: true,
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
name: 'minPrice',
|
|
81
|
+
description: 'Minimum price boundary for LP range (e.g., 0.90)',
|
|
82
|
+
required: false,
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
name: 'maxPrice',
|
|
86
|
+
description: 'Maximum price boundary for LP range (e.g., 1.10)',
|
|
87
|
+
required: false,
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
name: 'feeTier',
|
|
91
|
+
description: 'Fee tier in basis points: 500, 3000, or 10000 (default: 3000)',
|
|
92
|
+
required: false,
|
|
93
|
+
},
|
|
94
|
+
],
|
|
95
|
+
handler: (args) => {
|
|
96
|
+
// Validate amounts
|
|
97
|
+
(0, validation_js_1.validateNumericAmount)(args.amount0, 'amount0');
|
|
98
|
+
(0, validation_js_1.validateNumericAmount)(args.amount1, 'amount1');
|
|
99
|
+
const minPrice = args.minPrice || '0.95';
|
|
100
|
+
const maxPrice = args.maxPrice || '1.05';
|
|
101
|
+
const feeTier = args.feeTier || '3000';
|
|
102
|
+
return [
|
|
103
|
+
{
|
|
104
|
+
role: 'user',
|
|
105
|
+
content: {
|
|
106
|
+
type: 'text',
|
|
107
|
+
text: `I want to add liquidity to the ${args.token0}/${args.token1} pool on GalaSwap DEX.
|
|
108
|
+
|
|
109
|
+
**Liquidity Details:**
|
|
110
|
+
- Token Pair: ${args.token0} / ${args.token1}
|
|
111
|
+
- Amount of ${args.token0}: ${args.amount0}
|
|
112
|
+
- Amount of ${args.token1}: ${args.amount1}
|
|
113
|
+
- Price Range: ${minPrice} - ${maxPrice}
|
|
114
|
+
- Fee Tier: ${feeTier} basis points (${parseInt(feeTier) / 100}%)
|
|
115
|
+
|
|
116
|
+
**Workflow:**
|
|
117
|
+
1. Check my wallet balances to ensure I have sufficient tokens
|
|
118
|
+
2. Get pool information for the ${args.token0}/${args.token1} pair
|
|
119
|
+
3. Add liquidity by price range with the specified amounts and price boundaries
|
|
120
|
+
4. Confirm the position was created successfully
|
|
121
|
+
|
|
122
|
+
**Important:**
|
|
123
|
+
- Price range ${minPrice}-${maxPrice} means liquidity is only provided when the price is in this range
|
|
124
|
+
- Lower fee tiers (500 bps) for stablecoins, higher fees (3000-10000 bps) for volatile pairs
|
|
125
|
+
- I accept the estimated slippage shown in the quote
|
|
126
|
+
|
|
127
|
+
Please use the following MCP tools:
|
|
128
|
+
- gala_launchpad_get_swap_user_assets: Check my token balances
|
|
129
|
+
- gala_launchpad_get_swap_pool_info: Get ${args.token0}/${args.token1} pool details
|
|
130
|
+
- gala_launchpad_add_liquidity_by_price: Add liquidity with price range
|
|
131
|
+
|
|
132
|
+
Proceed with adding liquidity.`,
|
|
133
|
+
},
|
|
134
|
+
},
|
|
135
|
+
];
|
|
136
|
+
},
|
|
137
|
+
};
|
|
138
|
+
/**
|
|
139
|
+
* Remove Liquidity - Close or reduce LP position
|
|
140
|
+
*
|
|
141
|
+
* Guides through removing liquidity from an existing position
|
|
142
|
+
*/
|
|
143
|
+
exports.removeLiquidityPrompt = {
|
|
144
|
+
name: 'galachain-launchpad:remove-liquidity',
|
|
145
|
+
description: 'Remove liquidity from an existing position. Shows estimated tokens and fees to receive.',
|
|
146
|
+
arguments: [
|
|
147
|
+
{
|
|
148
|
+
name: 'positionId',
|
|
149
|
+
description: 'Position ID to remove liquidity from',
|
|
150
|
+
required: true,
|
|
151
|
+
},
|
|
152
|
+
{
|
|
153
|
+
name: 'percentage',
|
|
154
|
+
description: 'Percentage of liquidity to remove (0-100, default: 100 to close position)',
|
|
155
|
+
required: false,
|
|
156
|
+
},
|
|
157
|
+
],
|
|
158
|
+
handler: (args) => {
|
|
159
|
+
const percentage = args.percentage || '100';
|
|
160
|
+
return [
|
|
161
|
+
{
|
|
162
|
+
role: 'user',
|
|
163
|
+
content: {
|
|
164
|
+
type: 'text',
|
|
165
|
+
text: `I want to remove ${percentage}% of liquidity from position ${args.positionId}.
|
|
166
|
+
|
|
167
|
+
**Removal Details:**
|
|
168
|
+
- Position ID: ${args.positionId}
|
|
169
|
+
- Removal Amount: ${percentage}% of liquidity
|
|
170
|
+
${percentage === '100' ? '- Action: Close position completely' : '- Action: Reduce position by ' + percentage + '%'}
|
|
171
|
+
|
|
172
|
+
**Workflow:**
|
|
173
|
+
1. Get position details (token pair, current liquidity, accumulated fees)
|
|
174
|
+
2. Estimate tokens and fees that will be received when removing
|
|
175
|
+
3. Show the breakdown of what I'll receive
|
|
176
|
+
4. Execute the removal with slippage protection
|
|
177
|
+
5. Verify the position was updated/closed
|
|
178
|
+
|
|
179
|
+
**Important:**
|
|
180
|
+
- Removing 100% closes the position
|
|
181
|
+
- Removing less keeps the position open with reduced liquidity
|
|
182
|
+
- Accumulated fees can be collected separately if desired
|
|
183
|
+
- Slippage protection ensures I receive acceptable amounts
|
|
184
|
+
|
|
185
|
+
Please use the following MCP tools:
|
|
186
|
+
- gala_launchpad_get_liquidity_position_by_id: Get position details
|
|
187
|
+
- gala_launchpad_estimate_remove_liquidity: Preview what I'll receive
|
|
188
|
+
- gala_launchpad_remove_liquidity: Execute the removal
|
|
189
|
+
|
|
190
|
+
Proceed with removing liquidity.`,
|
|
191
|
+
},
|
|
192
|
+
},
|
|
193
|
+
];
|
|
194
|
+
},
|
|
195
|
+
};
|
|
196
|
+
/**
|
|
197
|
+
* Collect Fees - Harvest accumulated trading fees
|
|
198
|
+
*
|
|
199
|
+
* Guides through collecting accumulated fees from a position
|
|
200
|
+
*/
|
|
201
|
+
exports.collectFeesPrompt = {
|
|
202
|
+
name: 'galachain-launchpad:collect-fees',
|
|
203
|
+
description: 'Collect accumulated trading fees from a liquidity position without modifying the position.',
|
|
204
|
+
arguments: [
|
|
205
|
+
{
|
|
206
|
+
name: 'positionId',
|
|
207
|
+
description: 'Position ID to collect fees from',
|
|
208
|
+
required: true,
|
|
209
|
+
},
|
|
210
|
+
],
|
|
211
|
+
handler: (args) => {
|
|
212
|
+
return [
|
|
213
|
+
{
|
|
214
|
+
role: 'user',
|
|
215
|
+
content: {
|
|
216
|
+
type: 'text',
|
|
217
|
+
text: `I want to collect accumulated trading fees from position ${args.positionId}.
|
|
218
|
+
|
|
219
|
+
**Fee Collection Details:**
|
|
220
|
+
- Position ID: ${args.positionId}
|
|
221
|
+
- Action: Harvest accumulated trading fees
|
|
222
|
+
- Position Impact: Liquidity remains unchanged, only fees collected
|
|
223
|
+
|
|
224
|
+
**Workflow:**
|
|
225
|
+
1. Get position details to show accumulated fees
|
|
226
|
+
2. Show how much in fees is available to collect (in both tokens)
|
|
227
|
+
3. Execute fee collection transaction
|
|
228
|
+
4. Confirm fees were successfully collected
|
|
229
|
+
|
|
230
|
+
**Benefits:**
|
|
231
|
+
- Passive income from liquidity provision
|
|
232
|
+
- Fees accumulate continuously as trades happen
|
|
233
|
+
- Can be collected without closing the position
|
|
234
|
+
- Frees up rewards to reinvest or use elsewhere
|
|
235
|
+
|
|
236
|
+
**Important:**
|
|
237
|
+
- Fee collection doesn't affect your liquidity position
|
|
238
|
+
- Fees are only earned on trades within your price range
|
|
239
|
+
- Fee amounts depend on trading volume and your fee tier
|
|
240
|
+
|
|
241
|
+
Please use the following MCP tools:
|
|
242
|
+
- gala_launchpad_get_liquidity_position_by_id: Get position details and fee amounts
|
|
243
|
+
- gala_launchpad_collect_position_fees: Collect the accumulated fees
|
|
244
|
+
|
|
245
|
+
Proceed with collecting fees.`,
|
|
246
|
+
},
|
|
247
|
+
},
|
|
248
|
+
];
|
|
249
|
+
},
|
|
250
|
+
};
|
|
251
|
+
/**
|
|
252
|
+
* Export all liquidity position prompts
|
|
253
|
+
*/
|
|
254
|
+
exports.liquidityPositionPrompts = [
|
|
255
|
+
exports.myPositionsPrompt,
|
|
256
|
+
exports.addLiquidityPrompt,
|
|
257
|
+
exports.removeLiquidityPrompt,
|
|
258
|
+
exports.collectFeesPrompt,
|
|
259
|
+
];
|
|
260
|
+
//# sourceMappingURL=liquidity-positions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"liquidity-positions.js","sourceRoot":"","sources":["../../src/prompts/liquidity-positions.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;AAGH,0DAA+D;AAE/D;;;;GAIG;AACU,QAAA,iBAAiB,GAAc;IAC1C,IAAI,EAAE,kCAAkC;IACxC,WAAW,EACT,yFAAyF;IAC3F,SAAS,EAAE,EAAE;IACb,OAAO,EAAE,GAAG,EAAE;QACZ,OAAO;YACL;gBACE,IAAI,EAAE,MAAM;gBACZ,OAAO,EAAE;oBACP,IAAI,EAAE,MAAM;oBACZ,IAAI,EAAE;;;;;;;;;;;;;;;;;;;oCAmBoB;iBAC3B;aACF;SACF,CAAC;IACJ,CAAC;CACF,CAAC;AAEF;;;;GAIG;AACU,QAAA,kBAAkB,GAAc;IAC3C,IAAI,EAAE,mCAAmC;IACzC,WAAW,EACT,sGAAsG;IACxG,SAAS,EAAE;QACT;YACE,IAAI,EAAE,QAAQ;YACd,WAAW,EAAE,iCAAiC;YAC9C,QAAQ,EAAE,IAAI;SACf;QACD;YACE,IAAI,EAAE,QAAQ;YACd,WAAW,EAAE,mCAAmC;YAChD,QAAQ,EAAE,IAAI;SACf;QACD;YACE,IAAI,EAAE,SAAS;YACf,WAAW,EAAE,0CAA0C;YACvD,QAAQ,EAAE,IAAI;SACf;QACD;YACE,IAAI,EAAE,SAAS;YACf,WAAW,EAAE,0CAA0C;YACvD,QAAQ,EAAE,IAAI;SACf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CAAC;CACF,CAAC;AAEF;;GAEG;AACU,QAAA,wBAAwB,GAAgB;IACnD,yBAAiB;IACjB,0BAAkB;IAClB,6BAAqB;IACrB,yBAAiB;CAClB,CAAC"}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* DEX/GalaSwap Trading Operations Tools
|
|
3
3
|
*
|
|
4
4
|
* Tools for trading on GalaSwap DEX after tokens graduate from bonding curves.
|
|
5
|
-
* These tools provide quote generation, swap execution, and asset management.
|
|
5
|
+
* These tools provide quote generation, swap execution, liquidity management, and asset management.
|
|
6
6
|
*/
|
|
7
7
|
import type { MCPTool } from '../../types/mcp.js';
|
|
8
8
|
export declare const getSwapQuoteExactInputTool: MCPTool;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/tools/dex/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/tools/dex/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAiClD,eAAO,MAAM,0BAA0B,EAAE,OA6BxC,CAAC;AAGF,eAAO,MAAM,2BAA2B,EAAE,OA6BzC,CAAC;AAGF,eAAO,MAAM,eAAe,EAAE,OAuD7B,CAAC;AAGF,eAAO,MAAM,qBAAqB,EAAE,OA0BnC,CAAC;AAGF,eAAO,MAAM,mBAAmB,EAAE,OAwBjC,CAAC;AAGF,eAAO,MAAM,QAAQ,EAAE,OAAO,EAO7B,CAAC"}
|
package/dist/tools/dex/index.js
CHANGED
|
@@ -3,10 +3,11 @@
|
|
|
3
3
|
* DEX/GalaSwap Trading Operations Tools
|
|
4
4
|
*
|
|
5
5
|
* Tools for trading on GalaSwap DEX after tokens graduate from bonding curves.
|
|
6
|
-
* These tools provide quote generation, swap execution, and asset management.
|
|
6
|
+
* These tools provide quote generation, swap execution, liquidity management, and asset management.
|
|
7
7
|
*/
|
|
8
8
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
9
|
exports.dexTools = exports.getSwapPoolInfoTool = exports.getSwapUserAssetsTool = exports.executeSwapTool = exports.getSwapQuoteExactOutputTool = exports.getSwapQuoteExactInputTool = void 0;
|
|
10
|
+
const liquidity_positions_js_1 = require("./liquidity-positions.js");
|
|
10
11
|
const response_formatter_js_1 = require("../../utils/response-formatter.js");
|
|
11
12
|
const error_handler_js_1 = require("../../utils/error-handler.js");
|
|
12
13
|
const common_schemas_js_1 = require("../../schemas/common-schemas.js");
|
|
@@ -191,12 +192,13 @@ exports.getSwapPoolInfoTool = {
|
|
|
191
192
|
});
|
|
192
193
|
}),
|
|
193
194
|
};
|
|
194
|
-
// Export all DEX tools
|
|
195
|
+
// Export all DEX tools (5 swap tools + 8 liquidity position tools = 13 tools)
|
|
195
196
|
exports.dexTools = [
|
|
196
197
|
exports.getSwapQuoteExactInputTool,
|
|
197
198
|
exports.getSwapQuoteExactOutputTool,
|
|
198
199
|
exports.executeSwapTool,
|
|
199
200
|
exports.getSwapUserAssetsTool,
|
|
200
201
|
exports.getSwapPoolInfoTool,
|
|
202
|
+
...liquidity_positions_js_1.liquidityPositionTools,
|
|
201
203
|
];
|
|
202
204
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/tools/dex/index.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAGH,6EAAkE;AAClE,mEAAiE;AACjE,uEAGyC;AAEzC,+BAA+B;AAC/B,MAAM,mBAAmB,GAAG;IAC1B,IAAI,EAAE,QAAQ;IACd,SAAS,EAAE,CAAC;IACZ,SAAS,EAAE,EAAE;IACb,WAAW,EAAE,sCAAsC;CACpD,CAAC;AAEF,0CAA0C;AAC1C,MAAM,eAAe,GAAG;IACt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,QAAQ,EAAE,QAAQ,CAAC;KAC/B;IACD,OAAO,EAAE,IAAA,oCAAiB,EAAC,KAAK,EAAE,GAAG,EAAE,IAAI,EAAE,EAAE;QAC7C,MAAM,QAAQ,GAAG,MAAM,GAAG,CAAC,eAAe,CAAC,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC;QACrE,OAAO,IAAA,qCAAa,EAAC;YACnB,MAAM,EAAE,QAAQ,CAAC,MAAM;YACvB,MAAM,EAAE,QAAQ,CAAC,MAAM;YACvB,SAAS,EAAE,QAAQ,CAAC,SAAS;YAC7B,QAAQ,EAAE,QAAQ,CAAC,QAAQ;YAC3B,iBAAiB,EAAE,QAAQ,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,GAAG,IAAI,GAAG,GAAG,GAAG,CAAC;YACpE,SAAS,EAAE,QAAQ,CAAC,SAAS;YAC7B,OAAO,EAAE,QAAQ,IAAI,CAAC,MAAM,IAAI,IAAI,CAAC,MAAM,QAAQ,QAAQ,CAAC,SAAS,mBAAmB,QAAQ,CAAC,QAAQ,CAAC,MAAM,YAAY;SAC7H,CAAC,CAAC;IACL,CAAC,CAAC;CACH,CAAC;AAEF,8EAA8E;AACjE,QAAA,QAAQ,GAAc;IACjC,kCAA0B;IAC1B,mCAA2B;IAC3B,uBAAe;IACf,6BAAqB;IACrB,2BAAmB;IACnB,GAAG,+CAAsB;CAC1B,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* DEX Liquidity Position Management Tools
|
|
3
|
+
*
|
|
4
|
+
* Tools for managing liquidity positions on GalaSwap DEX, including:
|
|
5
|
+
* - Querying user positions and position details
|
|
6
|
+
* - Estimating liquidity removal
|
|
7
|
+
* - Adding liquidity by price or tick range
|
|
8
|
+
* - Removing liquidity and collecting fees
|
|
9
|
+
*/
|
|
10
|
+
import type { MCPTool } from '../../types/mcp.js';
|
|
11
|
+
export declare const getUserLiquidityPositionsTool: MCPTool;
|
|
12
|
+
export declare const getLiquidityPositionByIdTool: MCPTool;
|
|
13
|
+
export declare const getLiquidityPositionTool: MCPTool;
|
|
14
|
+
export declare const estimateRemoveLiquidityTool: MCPTool;
|
|
15
|
+
export declare const addLiquidityByPriceTool: MCPTool;
|
|
16
|
+
export declare const addLiquidityByTicksTool: MCPTool;
|
|
17
|
+
export declare const removeLiquidityTool: MCPTool;
|
|
18
|
+
export declare const collectPositionFeesTool: MCPTool;
|
|
19
|
+
export declare const liquidityPositionTools: MCPTool[];
|
|
20
|
+
//# sourceMappingURL=liquidity-positions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"liquidity-positions.d.ts","sourceRoot":"","sources":["../../../src/tools/dex/liquidity-positions.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAwBlD,eAAO,MAAM,6BAA6B,EAAE,OAuD3C,CAAC;AAGF,eAAO,MAAM,4BAA4B,EAAE,OA+C1C,CAAC;AAGF,eAAO,MAAM,wBAAwB,EAAE,OAyDtC,CAAC;AAGF,eAAO,MAAM,2BAA2B,EAAE,OAiDzC,CAAC;AAGF,eAAO,MAAM,uBAAuB,EAAE,OA8ErC,CAAC;AAGF,eAAO,MAAM,uBAAuB,EAAE,OA8ErC,CAAC;AAGF,eAAO,MAAM,mBAAmB,EAAE,OAgEjC,CAAC;AAGF,eAAO,MAAM,uBAAuB,EAAE,OAmDrC,CAAC;AAGF,eAAO,MAAM,sBAAsB,EAAE,OAAO,EAS3C,CAAC"}
|