@gala-chain/launchpad-mcp-server 1.24.1 → 1.25.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +30 -0
- package/dist/generated/version.d.ts +1 -1
- package/dist/generated/version.js +1 -1
- package/dist/tools/index.d.ts +2 -2
- package/dist/tools/index.js +3 -3
- package/dist/tools/pools/index.d.ts.map +1 -1
- package/dist/tools/pools/index.js +4 -0
- package/dist/tools/pools/index.js.map +1 -1
- package/dist/tools/pools/onDexPoolCreation.d.ts +6 -0
- package/dist/tools/pools/onDexPoolCreation.d.ts.map +1 -0
- package/dist/tools/pools/onDexPoolCreation.js +60 -0
- package/dist/tools/pools/onDexPoolCreation.js.map +1 -0
- package/dist/tools/pools/onLaunchpadTokenCreation.d.ts +6 -0
- package/dist/tools/pools/onLaunchpadTokenCreation.d.ts.map +1 -0
- package/dist/tools/pools/onLaunchpadTokenCreation.js +54 -0
- package/dist/tools/pools/onLaunchpadTokenCreation.js.map +1 -0
- package/package.json +2 -2
- package/docs/AI-AGENT-PATTERNS.md +0 -555
- package/docs/CONSTRAINTS-REFERENCE.md +0 -454
- package/docs/PROMPT-TOOL-MAPPING.md +0 -352
- package/docs/examples/default-values-pattern.md +0 -240
- package/docs/examples/tool-factory-pattern.md +0 -217
- package/jest.config.js +0 -94
- package/src/__tests__/integration/fetchTokenDetails.integration.test.ts +0 -258
- package/src/__tests__/integration/poolTools.integration.test.ts +0 -185
- package/src/__tests__/server.test.ts +0 -255
- package/src/constants/mcpToolNames.ts +0 -183
- package/src/index.ts +0 -19
- package/src/prompts/__tests__/promptStructure.test.ts +0 -187
- package/src/prompts/__tests__/registry.test.ts +0 -349
- package/src/prompts/analysis.ts +0 -380
- package/src/prompts/balances.ts +0 -182
- package/src/prompts/create-token.ts +0 -123
- package/src/prompts/creation-utils.ts +0 -103
- package/src/prompts/dex-trading.ts +0 -86
- package/src/prompts/discover-tokens.ts +0 -86
- package/src/prompts/explore-dex-pools.ts +0 -138
- package/src/prompts/index.ts +0 -178
- package/src/prompts/liquidity-positions.ts +0 -237
- package/src/prompts/pools.ts +0 -496
- package/src/prompts/portfolio.ts +0 -208
- package/src/prompts/social.ts +0 -94
- package/src/prompts/trading-calculations.ts +0 -414
- package/src/prompts/trading.ts +0 -160
- package/src/prompts/transfers.ts +0 -97
- package/src/prompts/utility-tools.ts +0 -266
- package/src/prompts/utility.ts +0 -77
- package/src/prompts/utils/handlerHelpers.ts +0 -55
- package/src/prompts/utils/textTemplates.ts +0 -73
- package/src/prompts/utils/workflowTemplates.ts +0 -511
- package/src/schemas/common-schemas.ts +0 -393
- package/src/scripts/test-all-prompts.ts +0 -184
- package/src/server.ts +0 -367
- package/src/tools/__tests__/dex-tools.test.ts +0 -562
- package/src/tools/__tests__/liquidity-positions.test.ts +0 -673
- package/src/tools/balance/index.ts +0 -174
- package/src/tools/creation/index.ts +0 -182
- package/src/tools/dex/fetchAllDexPools.ts +0 -45
- package/src/tools/dex/fetchDexPools.ts +0 -58
- package/src/tools/dex/index.ts +0 -231
- package/src/tools/dex/liquidity-positions.ts +0 -547
- package/src/tools/index.ts +0 -94
- package/src/tools/pools/fetchAllPools.ts +0 -47
- package/src/tools/pools/fetchAllPriceHistory.ts +0 -119
- package/src/tools/pools/fetchPoolDetails.ts +0 -27
- package/src/tools/pools/fetchPoolDetailsForCalculation.ts +0 -22
- package/src/tools/pools/fetchPools.ts +0 -47
- package/src/tools/pools/fetchPriceHistory.ts +0 -124
- package/src/tools/pools/fetchTokenDetails.ts +0 -77
- package/src/tools/pools/index.ts +0 -284
- package/src/tools/social/index.ts +0 -64
- package/src/tools/trading/index.ts +0 -605
- package/src/tools/transfers/index.ts +0 -75
- package/src/tools/utils/clearCache.ts +0 -36
- package/src/tools/utils/createWallet.ts +0 -19
- package/src/tools/utils/explainSdkUsage.ts +0 -1446
- package/src/tools/utils/getAddress.ts +0 -12
- package/src/tools/utils/getCacheInfo.ts +0 -14
- package/src/tools/utils/getConfig.ts +0 -21
- package/src/tools/utils/getEnvironment.ts +0 -17
- package/src/tools/utils/getEthereumAddress.ts +0 -12
- package/src/tools/utils/getUrlByTokenName.ts +0 -12
- package/src/tools/utils/getVersion.ts +0 -25
- package/src/tools/utils/getWallet.ts +0 -25
- package/src/tools/utils/hasWallet.ts +0 -15
- package/src/tools/utils/index.ts +0 -37
- package/src/tools/utils/isTokenGraduated.ts +0 -16
- package/src/tools/utils/setWallet.ts +0 -41
- package/src/tools/utils/switchEnvironment.ts +0 -28
- package/src/types/mcp.ts +0 -72
- package/src/utils/__tests__/validation.test.ts +0 -147
- package/src/utils/constraints.ts +0 -155
- package/src/utils/default-values.ts +0 -208
- package/src/utils/error-handler.ts +0 -69
- package/src/utils/error-templates.ts +0 -273
- package/src/utils/response-formatter.ts +0 -51
- package/src/utils/tool-factory.ts +0 -303
- package/src/utils/tool-registry.ts +0 -296
- package/src/utils/validation.ts +0 -429
- package/tests/wallet-management-integration.test.ts +0 -284
- package/tsconfig.json +0 -23
|
@@ -1,103 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Token Creation Utilities Prompts
|
|
3
|
-
*
|
|
4
|
-
* Slash commands for creation utility operations
|
|
5
|
-
*/
|
|
6
|
-
|
|
7
|
-
import type { MCPPrompt } from '../types/mcp.js';
|
|
8
|
-
import { MCP_TOOLS } from '../constants/mcpToolNames.js';
|
|
9
|
-
import { validateTokenName } from '../utils/validation.js';
|
|
10
|
-
import { createPromptResponse } from './utils/handlerHelpers.js';
|
|
11
|
-
import { createSimpleOperationText } from './utils/textTemplates.js';
|
|
12
|
-
|
|
13
|
-
/**
|
|
14
|
-
* Upload Profile Image - Standalone profile image upload
|
|
15
|
-
*/
|
|
16
|
-
export const uploadProfileImagePrompt: MCPPrompt = {
|
|
17
|
-
name: 'galachain-launchpad:upload-profile-image',
|
|
18
|
-
description: 'Upload profile image from filesystem',
|
|
19
|
-
arguments: [
|
|
20
|
-
{
|
|
21
|
-
name: 'imagePath',
|
|
22
|
-
description: 'Absolute file path to image file',
|
|
23
|
-
required: true,
|
|
24
|
-
},
|
|
25
|
-
{
|
|
26
|
-
name: 'address',
|
|
27
|
-
description: 'Wallet address (optional, defaults to SDK wallet)',
|
|
28
|
-
required: false,
|
|
29
|
-
},
|
|
30
|
-
],
|
|
31
|
-
handler: (args) =>
|
|
32
|
-
createPromptResponse(
|
|
33
|
-
createSimpleOperationText({
|
|
34
|
-
operation: 'Upload profile image.',
|
|
35
|
-
parameters: {
|
|
36
|
-
imagePath: `Image Path: ${args.imagePath}`,
|
|
37
|
-
wallet: args.address ? `Address: ${args.address}` : 'Using default wallet',
|
|
38
|
-
},
|
|
39
|
-
toolName: MCP_TOOLS.UPLOAD_PROFILE_IMAGE,
|
|
40
|
-
actionDescription: 'upload the image file',
|
|
41
|
-
displayFormat: 'Display confirmation and the image URL.',
|
|
42
|
-
})
|
|
43
|
-
),
|
|
44
|
-
};
|
|
45
|
-
|
|
46
|
-
/**
|
|
47
|
-
* Upload Token Image - Token image file upload
|
|
48
|
-
*/
|
|
49
|
-
export const uploadTokenImagePrompt: MCPPrompt = {
|
|
50
|
-
name: 'galachain-launchpad:upload-token-image',
|
|
51
|
-
description: 'Upload token image from filesystem (Node.js only)',
|
|
52
|
-
arguments: [
|
|
53
|
-
{
|
|
54
|
-
name: 'tokenName',
|
|
55
|
-
description: 'Token name (e.g., anime, mytoken)',
|
|
56
|
-
required: true,
|
|
57
|
-
},
|
|
58
|
-
{
|
|
59
|
-
name: 'imagePath',
|
|
60
|
-
description: 'Absolute file path to image file',
|
|
61
|
-
required: true,
|
|
62
|
-
},
|
|
63
|
-
],
|
|
64
|
-
handler: (args) => {
|
|
65
|
-
validateTokenName(args.tokenName);
|
|
66
|
-
|
|
67
|
-
return createPromptResponse(
|
|
68
|
-
createSimpleOperationText({
|
|
69
|
-
operation: 'Upload token image.',
|
|
70
|
-
parameters: {
|
|
71
|
-
token: `Token: ${args.tokenName}`,
|
|
72
|
-
imagePath: `Image Path: ${args.imagePath}`,
|
|
73
|
-
},
|
|
74
|
-
toolName: MCP_TOOLS.UPLOAD_TOKEN_IMAGE,
|
|
75
|
-
actionDescription: 'upload the token image file',
|
|
76
|
-
displayFormat: 'This tool is Node.js only (not available in browser).\n\nDisplay confirmation and the uploaded image URL.',
|
|
77
|
-
})
|
|
78
|
-
);
|
|
79
|
-
},
|
|
80
|
-
};
|
|
81
|
-
|
|
82
|
-
/**
|
|
83
|
-
* Fetch Launch Token Fee - Current launch fee query
|
|
84
|
-
*/
|
|
85
|
-
export const fetchLaunchTokenFeePrompt: MCPPrompt = {
|
|
86
|
-
name: 'galachain-launchpad:fetch-launch-token-fee',
|
|
87
|
-
description: 'Get the current GALA fee required to launch a new token',
|
|
88
|
-
handler: () =>
|
|
89
|
-
createPromptResponse(
|
|
90
|
-
createSimpleOperationText({
|
|
91
|
-
operation: 'Check the current token launch fee.',
|
|
92
|
-
toolName: MCP_TOOLS.FETCH_LAUNCH_TOKEN_FEE,
|
|
93
|
-
actionDescription: 'retrieve the current GALA fee',
|
|
94
|
-
displayFormat: 'This is a dynamic value that may change. Display the current fee amount.',
|
|
95
|
-
})
|
|
96
|
-
),
|
|
97
|
-
};
|
|
98
|
-
|
|
99
|
-
export const creationUtilityPrompts: MCPPrompt[] = [
|
|
100
|
-
uploadProfileImagePrompt,
|
|
101
|
-
uploadTokenImagePrompt,
|
|
102
|
-
fetchLaunchTokenFeePrompt,
|
|
103
|
-
];
|
|
@@ -1,86 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* DEX Trading Prompts
|
|
3
|
-
*
|
|
4
|
-
* Slash commands for GalaSwap DEX trading operations (for graduated tokens)
|
|
5
|
-
*/
|
|
6
|
-
|
|
7
|
-
import type { MCPPrompt } from '../types/mcp.js';
|
|
8
|
-
import { validateNumericAmount, validateSlippage } from '../utils/validation.js';
|
|
9
|
-
|
|
10
|
-
/**
|
|
11
|
-
* DEX Swap - Guided swap workflow for graduated tokens
|
|
12
|
-
*
|
|
13
|
-
* This prompt guides users through swapping tokens on GalaSwap DEX.
|
|
14
|
-
* It's designed for tokens that have graduated from bonding curves.
|
|
15
|
-
*/
|
|
16
|
-
export const dexSwapPrompt: MCPPrompt = {
|
|
17
|
-
name: 'galachain-launchpad:dex-swap',
|
|
18
|
-
description:
|
|
19
|
-
'Execute a token swap on GalaSwap DEX for graduated tokens. Get a quote first, then execute with slippage protection.',
|
|
20
|
-
arguments: [
|
|
21
|
-
{
|
|
22
|
-
name: 'fromToken',
|
|
23
|
-
description: 'Source token symbol (e.g., GALA, GUSDC)',
|
|
24
|
-
required: true,
|
|
25
|
-
},
|
|
26
|
-
{
|
|
27
|
-
name: 'toToken',
|
|
28
|
-
description: 'Destination token symbol (e.g., GUSDC, GALA)',
|
|
29
|
-
required: true,
|
|
30
|
-
},
|
|
31
|
-
{
|
|
32
|
-
name: 'amount',
|
|
33
|
-
description: 'Amount to swap (e.g., 100)',
|
|
34
|
-
required: true,
|
|
35
|
-
},
|
|
36
|
-
{
|
|
37
|
-
name: 'slippage',
|
|
38
|
-
description: 'Slippage tolerance percentage (default: 1)',
|
|
39
|
-
required: false,
|
|
40
|
-
},
|
|
41
|
-
],
|
|
42
|
-
handler: (args) => {
|
|
43
|
-
// Validate inputs
|
|
44
|
-
validateNumericAmount(args.amount, 'amount');
|
|
45
|
-
if (args.slippage) {
|
|
46
|
-
validateSlippage(args.slippage);
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
const slippageValue = args.slippage || '1';
|
|
50
|
-
|
|
51
|
-
return [
|
|
52
|
-
{
|
|
53
|
-
role: 'user',
|
|
54
|
-
content: {
|
|
55
|
-
type: 'text',
|
|
56
|
-
text: `I want to swap tokens on GalaSwap DEX:
|
|
57
|
-
|
|
58
|
-
**Swap Details:**
|
|
59
|
-
- From Token: ${args.fromToken}
|
|
60
|
-
- To Token: ${args.toToken}
|
|
61
|
-
- Amount: ${args.amount} ${args.fromToken}
|
|
62
|
-
- Slippage Tolerance: ${slippageValue}%
|
|
63
|
-
|
|
64
|
-
**Workflow:**
|
|
65
|
-
1. Get a swap quote for ${args.amount} ${args.fromToken} → ${args.toToken}
|
|
66
|
-
2. Review the estimated output and price impact
|
|
67
|
-
3. Execute the swap with ${slippageValue}% slippage protection
|
|
68
|
-
|
|
69
|
-
Please use the following MCP tools to complete this workflow:
|
|
70
|
-
- gala_launchpad_get_swap_quote_exact_input: Get initial quote before swapping
|
|
71
|
-
- gala_launchpad_get_swap_quote_exact_output: Get quote for specific desired output
|
|
72
|
-
- gala_launchpad_execute_swap: Execute the swap after review
|
|
73
|
-
- gala_launchpad_get_swap_user_assets: Check wallet balances
|
|
74
|
-
- gala_launchpad_get_swap_pool_info: Get pool details and fee tiers
|
|
75
|
-
|
|
76
|
-
Please proceed with getting the quote first, then guide me through the execution.`,
|
|
77
|
-
},
|
|
78
|
-
},
|
|
79
|
-
];
|
|
80
|
-
},
|
|
81
|
-
};
|
|
82
|
-
|
|
83
|
-
/**
|
|
84
|
-
* Export all DEX trading prompts
|
|
85
|
-
*/
|
|
86
|
-
export const dexTradingPrompts: MCPPrompt[] = [dexSwapPrompt];
|
|
@@ -1,86 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Token Discovery Prompts
|
|
3
|
-
*
|
|
4
|
-
* Slash commands for discovering and researching tokens on Gala Launchpad
|
|
5
|
-
*/
|
|
6
|
-
|
|
7
|
-
import type { MCPPrompt } from '../types/mcp.js';
|
|
8
|
-
import { createDiscoverTokensWorkflow } from './utils/workflowTemplates.js';
|
|
9
|
-
import { validateNumericAmount } from '../utils/validation.js';
|
|
10
|
-
|
|
11
|
-
/**
|
|
12
|
-
* Discover Tokens - Token discovery and exploration workflow
|
|
13
|
-
*/
|
|
14
|
-
export const discoverTokensPrompt: MCPPrompt = {
|
|
15
|
-
name: 'galachain-launchpad:discover-tokens',
|
|
16
|
-
description:
|
|
17
|
-
'Discover new opportunities on Gala Launchpad - find recently launched tokens, popular tokens, or tokens near graduation',
|
|
18
|
-
arguments: [
|
|
19
|
-
{
|
|
20
|
-
name: 'type',
|
|
21
|
-
description:
|
|
22
|
-
'Type of discovery - "recent" for newly launched tokens (default), "popular" for most traded tokens, or "near-graduation" for tokens close to completing their bonding curve',
|
|
23
|
-
required: false,
|
|
24
|
-
},
|
|
25
|
-
{
|
|
26
|
-
name: 'limit',
|
|
27
|
-
description: 'Number of tokens to show (default: 10, max: 50)',
|
|
28
|
-
required: false,
|
|
29
|
-
},
|
|
30
|
-
{
|
|
31
|
-
name: 'minProgress',
|
|
32
|
-
description:
|
|
33
|
-
'Minimum graduation progress percentage - only for "near-graduation" type (e.g., "85" for 85%+ progress)',
|
|
34
|
-
required: false,
|
|
35
|
-
},
|
|
36
|
-
{
|
|
37
|
-
name: 'maxPrice',
|
|
38
|
-
description:
|
|
39
|
-
'Maximum USD price for tokens (e.g., "1.50" to find tokens under $1.50) - useful for finding low-cost tokens to accumulate',
|
|
40
|
-
required: false,
|
|
41
|
-
},
|
|
42
|
-
],
|
|
43
|
-
handler: (args) => {
|
|
44
|
-
// Parse and validate inputs
|
|
45
|
-
const type = (args.type || 'recent') as 'recent' | 'popular' | 'near-graduation';
|
|
46
|
-
const limit = Math.min(Math.max(1, parseInt(args.limit || '10', 10)), 50);
|
|
47
|
-
|
|
48
|
-
// Validate type
|
|
49
|
-
if (!['recent', 'popular', 'near-graduation'].includes(type)) {
|
|
50
|
-
throw new Error('Type must be "recent", "popular", or "near-graduation"');
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
// Validate minProgress if provided
|
|
54
|
-
if (args.minProgress) {
|
|
55
|
-
const progress = parseInt(args.minProgress, 10);
|
|
56
|
-
if (isNaN(progress) || progress < 0 || progress > 100) {
|
|
57
|
-
throw new Error('minProgress must be a number between 0 and 100');
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
// Validate maxPrice if provided
|
|
62
|
-
if (args.maxPrice) {
|
|
63
|
-
validateNumericAmount(args.maxPrice, 'maxPrice');
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
return [
|
|
67
|
-
{
|
|
68
|
-
role: 'user',
|
|
69
|
-
content: {
|
|
70
|
-
type: 'text',
|
|
71
|
-
text: createDiscoverTokensWorkflow({
|
|
72
|
-
type,
|
|
73
|
-
limit,
|
|
74
|
-
minProgress: args.minProgress,
|
|
75
|
-
maxPrice: args.maxPrice,
|
|
76
|
-
}),
|
|
77
|
-
},
|
|
78
|
-
},
|
|
79
|
-
];
|
|
80
|
-
},
|
|
81
|
-
};
|
|
82
|
-
|
|
83
|
-
/**
|
|
84
|
-
* Export all discovery prompts
|
|
85
|
-
*/
|
|
86
|
-
export const discoveryPrompts: MCPPrompt[] = [discoverTokensPrompt];
|
|
@@ -1,138 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* DEX Pool Exploration Prompts
|
|
3
|
-
*
|
|
4
|
-
* Slash commands for discovering and exploring GalaSwap DEX liquidity pools.
|
|
5
|
-
* These prompts guide users through finding trading pairs and analyzing pool metrics.
|
|
6
|
-
*/
|
|
7
|
-
|
|
8
|
-
import type { MCPPrompt } from '../types/mcp.js';
|
|
9
|
-
import { MCP_TOOLS } from '../constants/mcpToolNames.js';
|
|
10
|
-
import { validatePaginationLimit } from '../utils/validation.js';
|
|
11
|
-
import { createPromptResponse } from './utils/handlerHelpers.js';
|
|
12
|
-
import { createSimpleOperationText } from './utils/textTemplates.js';
|
|
13
|
-
|
|
14
|
-
/**
|
|
15
|
-
* Fetch DEX Pools - Paginated pool discovery with filters
|
|
16
|
-
*/
|
|
17
|
-
export const fetchDexPoolsPrompt: MCPPrompt = {
|
|
18
|
-
name: 'galachain-launchpad:fetch-dex-pools',
|
|
19
|
-
description: 'Discover DEX liquidity pools with pagination, sorting, and search filtering',
|
|
20
|
-
arguments: [
|
|
21
|
-
{
|
|
22
|
-
name: 'search',
|
|
23
|
-
description: 'Search filter for token symbols (e.g., GALA, GUSDC, GWETH)',
|
|
24
|
-
required: false,
|
|
25
|
-
},
|
|
26
|
-
{
|
|
27
|
-
name: 'sortBy',
|
|
28
|
-
description: 'Sort field: tvl (default), volume30d, or volume1d',
|
|
29
|
-
required: false,
|
|
30
|
-
},
|
|
31
|
-
{
|
|
32
|
-
name: 'sortOrder',
|
|
33
|
-
description: 'Sort order: desc (default) or asc',
|
|
34
|
-
required: false,
|
|
35
|
-
},
|
|
36
|
-
{
|
|
37
|
-
name: 'page',
|
|
38
|
-
description: 'Page number (default: 1)',
|
|
39
|
-
required: false,
|
|
40
|
-
},
|
|
41
|
-
{
|
|
42
|
-
name: 'limit',
|
|
43
|
-
description: 'Results per page (default: 10, max: 20)',
|
|
44
|
-
required: false,
|
|
45
|
-
},
|
|
46
|
-
],
|
|
47
|
-
handler: (args) => {
|
|
48
|
-
if (args.limit) {
|
|
49
|
-
validatePaginationLimit(args.limit, 20);
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
const sortBy = args.sortBy || 'tvl';
|
|
53
|
-
const sortOrder = args.sortOrder || 'desc';
|
|
54
|
-
const page = args.page || 1;
|
|
55
|
-
const limit = args.limit || 10;
|
|
56
|
-
|
|
57
|
-
return createPromptResponse(
|
|
58
|
-
createSimpleOperationText({
|
|
59
|
-
operation: 'Discover liquidity pools on GalaSwap DEX.',
|
|
60
|
-
parameters: {
|
|
61
|
-
search: args.search ? `Search: ${args.search}` : 'Search: (none)',
|
|
62
|
-
sort_by: `Sort by: ${sortBy}`,
|
|
63
|
-
sort_order: `Order: ${sortOrder}`,
|
|
64
|
-
page: `Page: ${page}`,
|
|
65
|
-
limit: `Limit: ${limit}`,
|
|
66
|
-
},
|
|
67
|
-
toolName: MCP_TOOLS.FETCH_DEX_POOLS,
|
|
68
|
-
actionDescription: 'retrieve liquidity pools with pagination and filtering',
|
|
69
|
-
displayFormat: 'Display results showing pool names, token pairs, TVL, volumes, and APR metrics.',
|
|
70
|
-
})
|
|
71
|
-
);
|
|
72
|
-
},
|
|
73
|
-
};
|
|
74
|
-
|
|
75
|
-
/**
|
|
76
|
-
* Fetch All DEX Pools - Complete pool discovery with auto-pagination
|
|
77
|
-
*/
|
|
78
|
-
export const fetchAllDexPoolsPrompt: MCPPrompt = {
|
|
79
|
-
name: 'galachain-launchpad:fetch-all-dex-pools',
|
|
80
|
-
description: 'Discover ALL DEX liquidity pools with automatic pagination',
|
|
81
|
-
arguments: [
|
|
82
|
-
{
|
|
83
|
-
name: 'search',
|
|
84
|
-
description: 'Search filter for token symbols (e.g., GALA, GUSDC)',
|
|
85
|
-
required: false,
|
|
86
|
-
},
|
|
87
|
-
{
|
|
88
|
-
name: 'sortBy',
|
|
89
|
-
description: 'Sort field: tvl (default), volume30d, or volume1d',
|
|
90
|
-
required: false,
|
|
91
|
-
},
|
|
92
|
-
{
|
|
93
|
-
name: 'sortOrder',
|
|
94
|
-
description: 'Sort order: desc (default) or asc',
|
|
95
|
-
required: false,
|
|
96
|
-
},
|
|
97
|
-
],
|
|
98
|
-
handler: (args) => {
|
|
99
|
-
const sortBy = args.sortBy || 'tvl';
|
|
100
|
-
const sortOrder = args.sortOrder || 'desc';
|
|
101
|
-
|
|
102
|
-
return [
|
|
103
|
-
{
|
|
104
|
-
role: 'user',
|
|
105
|
-
content: {
|
|
106
|
-
type: 'text',
|
|
107
|
-
text: `I want to discover all DEX liquidity pools on GalaSwap.
|
|
108
|
-
|
|
109
|
-
**Discovery Parameters:**
|
|
110
|
-
- Search Filter: ${args.search || '(none - get all pools)'}
|
|
111
|
-
- Sort By: ${sortBy}
|
|
112
|
-
- Sort Order: ${sortOrder}
|
|
113
|
-
|
|
114
|
-
**Action:**
|
|
115
|
-
Fetch all available DEX pools with automatic pagination. Show me comprehensive pool data including:
|
|
116
|
-
- Pool identifiers (token pairs)
|
|
117
|
-
- Total Value Locked (TVL) and TVL breakdown by token
|
|
118
|
-
- 24-hour and 30-day trading volumes
|
|
119
|
-
- Fee tiers and APR
|
|
120
|
-
- Volume-to-TVL ratios
|
|
121
|
-
|
|
122
|
-
Please use the following MCP tool:
|
|
123
|
-
- gala_launchpad_fetch_all_dex_pools: Retrieve all pools with auto-pagination
|
|
124
|
-
|
|
125
|
-
Display the results in a clear format showing the top pools and key metrics for analysis.`,
|
|
126
|
-
},
|
|
127
|
-
},
|
|
128
|
-
];
|
|
129
|
-
},
|
|
130
|
-
};
|
|
131
|
-
|
|
132
|
-
/**
|
|
133
|
-
* Export all DEX pool exploration prompts
|
|
134
|
-
*/
|
|
135
|
-
export const exploreDexPoolsPrompts: MCPPrompt[] = [
|
|
136
|
-
fetchDexPoolsPrompt,
|
|
137
|
-
fetchAllDexPoolsPrompt,
|
|
138
|
-
];
|
package/src/prompts/index.ts
DELETED
|
@@ -1,178 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Gala Launchpad MCP Prompts (Slash Commands)
|
|
3
|
-
*
|
|
4
|
-
* Provides user-friendly slash commands for common Launchpad workflows
|
|
5
|
-
*/
|
|
6
|
-
|
|
7
|
-
import { tradingPrompts } from './trading.js';
|
|
8
|
-
import { portfolioPrompts } from './portfolio.js';
|
|
9
|
-
import { analysisPrompts } from './analysis.js';
|
|
10
|
-
import { utilityPrompts } from './utility.js';
|
|
11
|
-
import { creationPrompts } from './create-token.js';
|
|
12
|
-
import { discoveryPrompts } from './discover-tokens.js';
|
|
13
|
-
import { dexTradingPrompts } from './dex-trading.js';
|
|
14
|
-
import { exploreDexPoolsPrompts } from './explore-dex-pools.js';
|
|
15
|
-
import { liquidityPositionPrompts } from './liquidity-positions.js';
|
|
16
|
-
import { poolPrompts } from './pools.js';
|
|
17
|
-
import { tradingCalculationPrompts } from './trading-calculations.js';
|
|
18
|
-
import { balancePrompts } from './balances.js';
|
|
19
|
-
import { creationUtilityPrompts } from './creation-utils.js';
|
|
20
|
-
import { socialPrompts } from './social.js';
|
|
21
|
-
import { transferPrompts } from './transfers.js';
|
|
22
|
-
import { utilityToolPrompts } from './utility-tools.js';
|
|
23
|
-
import type { MCPPrompt } from '../types/mcp.js';
|
|
24
|
-
|
|
25
|
-
/**
|
|
26
|
-
* All available prompts (74 total - 2 new DEX pool exploration prompts)
|
|
27
|
-
*/
|
|
28
|
-
export const prompts: MCPPrompt[] = [
|
|
29
|
-
...tradingPrompts,
|
|
30
|
-
...portfolioPrompts,
|
|
31
|
-
...analysisPrompts,
|
|
32
|
-
...creationPrompts,
|
|
33
|
-
...discoveryPrompts,
|
|
34
|
-
...dexTradingPrompts,
|
|
35
|
-
...exploreDexPoolsPrompts,
|
|
36
|
-
...liquidityPositionPrompts,
|
|
37
|
-
...utilityPrompts,
|
|
38
|
-
...poolPrompts,
|
|
39
|
-
...tradingCalculationPrompts,
|
|
40
|
-
...balancePrompts,
|
|
41
|
-
...creationUtilityPrompts,
|
|
42
|
-
...socialPrompts,
|
|
43
|
-
...transferPrompts,
|
|
44
|
-
...utilityToolPrompts,
|
|
45
|
-
];
|
|
46
|
-
|
|
47
|
-
/**
|
|
48
|
-
* Optimized prompt registry using Map for O(1) lookups
|
|
49
|
-
* Improves performance for large prompt collections
|
|
50
|
-
*/
|
|
51
|
-
const promptMap = new Map<string, MCPPrompt>(
|
|
52
|
-
prompts.map((prompt) => [prompt.name, prompt])
|
|
53
|
-
);
|
|
54
|
-
|
|
55
|
-
/**
|
|
56
|
-
* Get prompt by name (optimized with Map lookup)
|
|
57
|
-
*
|
|
58
|
-
* @param name - Prompt name (e.g., 'galachain-launchpad:analyze-token')
|
|
59
|
-
* @returns Prompt object or undefined if not found
|
|
60
|
-
*
|
|
61
|
-
* @example
|
|
62
|
-
* ```typescript
|
|
63
|
-
* const prompt = getPrompt('galachain-launchpad:buy-tokens');
|
|
64
|
-
* if (prompt) {
|
|
65
|
-
* const messages = prompt.handler({ tokenName: 'anime', galaAmount: '100' });
|
|
66
|
-
* }
|
|
67
|
-
* ```
|
|
68
|
-
*/
|
|
69
|
-
export function getPrompt(name: string): MCPPrompt | undefined {
|
|
70
|
-
return promptMap.get(name);
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
/**
|
|
74
|
-
* Get all prompt names
|
|
75
|
-
*
|
|
76
|
-
* @returns Array of all registered prompt names
|
|
77
|
-
*
|
|
78
|
-
* @example
|
|
79
|
-
* ```typescript
|
|
80
|
-
* const names = getPromptNames();
|
|
81
|
-
* // ['galachain-launchpad:analyze-token', 'galachain-launchpad:buy-tokens', ...]
|
|
82
|
-
* ```
|
|
83
|
-
*/
|
|
84
|
-
export function getPromptNames(): string[] {
|
|
85
|
-
return Array.from(promptMap.keys());
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
/**
|
|
89
|
-
* Check if a prompt exists by name
|
|
90
|
-
*
|
|
91
|
-
* @param name - Prompt name to check
|
|
92
|
-
* @returns True if prompt exists, false otherwise
|
|
93
|
-
*
|
|
94
|
-
* @example
|
|
95
|
-
* ```typescript
|
|
96
|
-
* if (hasPrompt('galachain-launchpad:analyze-token')) {
|
|
97
|
-
* console.log('Prompt is available');
|
|
98
|
-
* }
|
|
99
|
-
* ```
|
|
100
|
-
*/
|
|
101
|
-
export function hasPrompt(name: string): boolean {
|
|
102
|
-
return promptMap.has(name);
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
/**
|
|
106
|
-
* Get prompts by category
|
|
107
|
-
*
|
|
108
|
-
* @param category - Category name ('trading', 'portfolio', 'analysis', 'creation', 'discovery', 'dex', or 'utility')
|
|
109
|
-
* @returns Array of prompts in the specified category
|
|
110
|
-
*
|
|
111
|
-
* @example
|
|
112
|
-
* ```typescript
|
|
113
|
-
* const tradingCommands = getPromptsByCategory('trading');
|
|
114
|
-
* // Returns [analyzeTokenPrompt, buyTokensPrompt, sellTokensPrompt, graduateTokenPrompt]
|
|
115
|
-
* const dexCommands = getPromptsByCategory('dex');
|
|
116
|
-
* // Returns [dexSwapPrompt]
|
|
117
|
-
* ```
|
|
118
|
-
*/
|
|
119
|
-
export function getPromptsByCategory(
|
|
120
|
-
category: 'trading' | 'portfolio' | 'analysis' | 'creation' | 'discovery' | 'dex' | 'liquidity' | 'utility'
|
|
121
|
-
): MCPPrompt[] {
|
|
122
|
-
switch (category) {
|
|
123
|
-
case 'trading':
|
|
124
|
-
return tradingPrompts;
|
|
125
|
-
case 'portfolio':
|
|
126
|
-
return portfolioPrompts;
|
|
127
|
-
case 'analysis':
|
|
128
|
-
return analysisPrompts;
|
|
129
|
-
case 'creation':
|
|
130
|
-
return creationPrompts;
|
|
131
|
-
case 'discovery':
|
|
132
|
-
return [...discoveryPrompts, ...exploreDexPoolsPrompts];
|
|
133
|
-
case 'dex':
|
|
134
|
-
return dexTradingPrompts;
|
|
135
|
-
case 'liquidity':
|
|
136
|
-
return liquidityPositionPrompts;
|
|
137
|
-
case 'utility':
|
|
138
|
-
return utilityPrompts;
|
|
139
|
-
default:
|
|
140
|
-
return [];
|
|
141
|
-
}
|
|
142
|
-
}
|
|
143
|
-
|
|
144
|
-
/**
|
|
145
|
-
* Get prompt count
|
|
146
|
-
*
|
|
147
|
-
* @returns Total number of registered prompts
|
|
148
|
-
*
|
|
149
|
-
* @example
|
|
150
|
-
* ```typescript
|
|
151
|
-
* console.log(`Total prompts: ${getPromptCount()}`); // Total prompts: 15
|
|
152
|
-
* ```
|
|
153
|
-
*/
|
|
154
|
-
export function getPromptCount(): number {
|
|
155
|
-
return promptMap.size;
|
|
156
|
-
}
|
|
157
|
-
|
|
158
|
-
/**
|
|
159
|
-
* Export individual prompt categories for documentation
|
|
160
|
-
*/
|
|
161
|
-
export {
|
|
162
|
-
tradingPrompts,
|
|
163
|
-
portfolioPrompts,
|
|
164
|
-
analysisPrompts,
|
|
165
|
-
creationPrompts,
|
|
166
|
-
discoveryPrompts,
|
|
167
|
-
dexTradingPrompts,
|
|
168
|
-
exploreDexPoolsPrompts,
|
|
169
|
-
liquidityPositionPrompts,
|
|
170
|
-
utilityPrompts,
|
|
171
|
-
poolPrompts,
|
|
172
|
-
tradingCalculationPrompts,
|
|
173
|
-
balancePrompts,
|
|
174
|
-
creationUtilityPrompts,
|
|
175
|
-
socialPrompts,
|
|
176
|
-
transferPrompts,
|
|
177
|
-
utilityToolPrompts,
|
|
178
|
-
};
|