@gala-chain/launchpad-mcp-server 1.2.4 → 1.2.6
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.
|
@@ -4,53 +4,45 @@
|
|
|
4
4
|
* Reusable schema components to eliminate duplication across 37 MCP tools.
|
|
5
5
|
* These schemas are imported and composed into tool-specific inputSchema definitions.
|
|
6
6
|
*
|
|
7
|
+
* UNIFIED APPROACH: Uses SDK Zod schemas as single source of truth, converting to JSON Schema for MCP.
|
|
8
|
+
*
|
|
7
9
|
* @see https://modelcontextprotocol.io/docs/concepts/tools
|
|
8
10
|
*/
|
|
9
11
|
/**
|
|
10
12
|
* Token name schema - used in 11+ tools
|
|
11
|
-
*
|
|
13
|
+
* Generated from SDK tokenNameSchema
|
|
12
14
|
*/
|
|
13
|
-
export declare const TOKEN_NAME_SCHEMA:
|
|
14
|
-
type: "string";
|
|
15
|
-
pattern: string;
|
|
16
|
-
description: string;
|
|
17
|
-
};
|
|
15
|
+
export declare const TOKEN_NAME_SCHEMA: any;
|
|
18
16
|
/**
|
|
19
17
|
* Token symbol schema - used in creation tools
|
|
20
|
-
*
|
|
18
|
+
* Generated from SDK tokenSymbolSchema
|
|
21
19
|
*/
|
|
22
|
-
export declare const TOKEN_SYMBOL_SCHEMA:
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
20
|
+
export declare const TOKEN_SYMBOL_SCHEMA: any;
|
|
21
|
+
/**
|
|
22
|
+
* Token description schema
|
|
23
|
+
* Generated from SDK tokenDescriptionSchema
|
|
24
|
+
*/
|
|
25
|
+
export declare const TOKEN_DESCRIPTION_SCHEMA: any;
|
|
27
26
|
/**
|
|
28
27
|
* Private key schema - used in 18+ tools
|
|
29
|
-
*
|
|
28
|
+
* Generated from SDK privateKeySchema
|
|
30
29
|
*/
|
|
31
|
-
export declare const PRIVATE_KEY_SCHEMA:
|
|
32
|
-
type: "string";
|
|
33
|
-
pattern: string;
|
|
34
|
-
description: string;
|
|
35
|
-
};
|
|
30
|
+
export declare const PRIVATE_KEY_SCHEMA: any;
|
|
36
31
|
/**
|
|
37
32
|
* Wallet address schema - supports both Ethereum (0x...) and GalaChain (eth|...) formats
|
|
38
|
-
*
|
|
33
|
+
* Generated from SDK flexibleAddressSchema
|
|
39
34
|
*/
|
|
40
|
-
export declare const ADDRESS_SCHEMA:
|
|
41
|
-
type: "string";
|
|
42
|
-
pattern: string;
|
|
43
|
-
description: string;
|
|
44
|
-
};
|
|
35
|
+
export declare const ADDRESS_SCHEMA: any;
|
|
45
36
|
/**
|
|
46
37
|
* Decimal amount schema - used in trading and transfer tools
|
|
47
|
-
*
|
|
38
|
+
* Generated from SDK positiveDecimalStringSchema
|
|
48
39
|
*/
|
|
49
|
-
export declare const DECIMAL_AMOUNT_SCHEMA:
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
40
|
+
export declare const DECIMAL_AMOUNT_SCHEMA: any;
|
|
41
|
+
/**
|
|
42
|
+
* Pre-buy quantity schema - used in token creation
|
|
43
|
+
* Generated from SDK nonNegativeDecimalStringSchema
|
|
44
|
+
*/
|
|
45
|
+
export declare const PRE_BUY_QUANTITY_SCHEMA: any;
|
|
54
46
|
/**
|
|
55
47
|
* Integer amount schema - used in token transfers
|
|
56
48
|
* Pattern: positive integer string
|
|
@@ -62,87 +54,56 @@ export declare const INTEGER_AMOUNT_SCHEMA: {
|
|
|
62
54
|
};
|
|
63
55
|
/**
|
|
64
56
|
* URL schema - used for social URLs and token images
|
|
57
|
+
* Generated from SDK urlSchema
|
|
65
58
|
*/
|
|
66
|
-
export declare const URL_SCHEMA:
|
|
67
|
-
type: "string";
|
|
68
|
-
format: string;
|
|
69
|
-
};
|
|
59
|
+
export declare const URL_SCHEMA: any;
|
|
70
60
|
/**
|
|
71
|
-
*
|
|
61
|
+
* Comment message schema
|
|
62
|
+
* Generated from SDK commentMessageSchema
|
|
72
63
|
*/
|
|
73
|
-
export declare const
|
|
74
|
-
type: "number";
|
|
75
|
-
minimum: 1;
|
|
76
|
-
description: string;
|
|
77
|
-
};
|
|
64
|
+
export declare const COMMENT_MESSAGE_SCHEMA: any;
|
|
78
65
|
/**
|
|
79
|
-
*
|
|
80
|
-
*
|
|
81
|
-
* @param operationType - The type of operation (trade, user, pool, comment)
|
|
82
|
-
* @param defaultLimit - Default limit value (typically 20)
|
|
83
|
-
* @returns Limit schema with appropriate maximum
|
|
66
|
+
* Profile name schema
|
|
67
|
+
* Generated from SDK fullNameSchema
|
|
84
68
|
*/
|
|
85
|
-
export declare
|
|
86
|
-
type: 'number';
|
|
87
|
-
minimum: number;
|
|
88
|
-
maximum: number;
|
|
89
|
-
description: string;
|
|
90
|
-
};
|
|
69
|
+
export declare const FULL_NAME_SCHEMA: any;
|
|
91
70
|
/**
|
|
92
|
-
*
|
|
93
|
-
*
|
|
94
|
-
*/
|
|
95
|
-
export declare const TRANSACTION_ID_SCHEMA: {
|
|
96
|
-
type: "string";
|
|
97
|
-
pattern: string;
|
|
98
|
-
description: string;
|
|
99
|
-
};
|
|
100
|
-
/**
|
|
101
|
-
* Idempotency key schema - used in transfer tools
|
|
71
|
+
* Search query schema - used in user tools
|
|
72
|
+
* Generated from SDK searchQuerySchema
|
|
102
73
|
*/
|
|
103
|
-
export declare const
|
|
104
|
-
type: "string";
|
|
105
|
-
pattern: string;
|
|
106
|
-
description: string;
|
|
107
|
-
};
|
|
74
|
+
export declare const SEARCH_SCHEMA: any;
|
|
108
75
|
/**
|
|
109
|
-
*
|
|
76
|
+
* Transaction ID schema - used for getBundlerTransactionResult
|
|
77
|
+
* Generated from SDK transactionIdSchema
|
|
110
78
|
*/
|
|
111
|
-
export declare const
|
|
112
|
-
type: "string";
|
|
113
|
-
maxLength: number;
|
|
114
|
-
description: string;
|
|
115
|
-
};
|
|
79
|
+
export declare const TRANSACTION_ID_SCHEMA: any;
|
|
116
80
|
/**
|
|
117
|
-
*
|
|
81
|
+
* Idempotency key schema - used in transfer tools
|
|
82
|
+
* Generated from SDK uniqueKeySchema
|
|
118
83
|
*/
|
|
119
|
-
export declare const
|
|
120
|
-
type: "string";
|
|
121
|
-
maxLength: number;
|
|
122
|
-
pattern: string;
|
|
123
|
-
description: string;
|
|
124
|
-
};
|
|
84
|
+
export declare const UNIQUE_KEY_SCHEMA: any;
|
|
125
85
|
/**
|
|
126
|
-
*
|
|
86
|
+
* Date-time schema - used in trade and volume queries
|
|
87
|
+
* Generated from SDK isoDateStringSchema
|
|
127
88
|
*/
|
|
128
|
-
export declare const
|
|
129
|
-
type: "string";
|
|
130
|
-
description: string;
|
|
131
|
-
};
|
|
89
|
+
export declare const DATE_TIME_SCHEMA: any;
|
|
132
90
|
/**
|
|
133
|
-
*
|
|
91
|
+
* Page number schema - used in ~15 tools
|
|
92
|
+
* Generated from SDK pageNumberSchema
|
|
134
93
|
*/
|
|
135
|
-
export declare const
|
|
136
|
-
type: "string";
|
|
137
|
-
pattern: string;
|
|
138
|
-
description: string;
|
|
139
|
-
};
|
|
94
|
+
export declare const PAGE_SCHEMA: any;
|
|
140
95
|
/**
|
|
141
|
-
*
|
|
96
|
+
* Creates a limit schema with operation-specific maximum
|
|
97
|
+
* Uses SDK Zod schemas and converts to JSON Schema
|
|
98
|
+
*
|
|
99
|
+
* @param operationType - The type of operation (trade, user, pool, comment)
|
|
100
|
+
* @param defaultLimit - Default limit value (typically 20)
|
|
101
|
+
* @returns Limit schema with appropriate maximum
|
|
142
102
|
*/
|
|
143
|
-
export declare
|
|
144
|
-
type:
|
|
145
|
-
|
|
103
|
+
export declare function createLimitSchema(operationType: 'trade' | 'user' | 'pool' | 'comment', defaultLimit?: number): {
|
|
104
|
+
type: 'number';
|
|
105
|
+
minimum: number;
|
|
106
|
+
maximum: number;
|
|
146
107
|
description: string;
|
|
147
108
|
};
|
|
148
109
|
/**
|
|
@@ -163,13 +124,6 @@ export declare const RBC_FEE_SLIPPAGE_SCHEMA: {
|
|
|
163
124
|
maximum: number;
|
|
164
125
|
description: string;
|
|
165
126
|
};
|
|
166
|
-
/**
|
|
167
|
-
* Date-time schema - used in trade and volume queries
|
|
168
|
-
*/
|
|
169
|
-
export declare const DATE_TIME_SCHEMA: {
|
|
170
|
-
type: "string";
|
|
171
|
-
format: string;
|
|
172
|
-
};
|
|
173
127
|
/**
|
|
174
128
|
* Sort order schema
|
|
175
129
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"common-schemas.d.ts","sourceRoot":"","sources":["../../src/schemas/common-schemas.ts"],"names":[],"mappings":"AAAA
|
|
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;AAMnF;;;GAGG;AACH,eAAO,MAAM,qBAAqB,KAGjC,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,uBAAuB,KAGnC,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,qBAAqB;;;;CAIjC,CAAC;AAMF;;;GAGG;AACH,eAAO,MAAM,UAAU,KAAyB,CAAC;AAEjD;;;GAGG;AACH,eAAO,MAAM,sBAAsB,KAGlC,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,gBAAgB,KAA2C,CAAC;AAEzE;;;GAGG;AACH,eAAO,MAAM,aAAa,KAGzB,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,qBAAqB,KAGjC,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,iBAAiB,KAA2D,CAAC;AAE1F;;;GAGG;AACH,eAAO,MAAM,gBAAgB,KAAmC,CAAC;AAMjE;;;GAGG;AACH,eAAO,MAAM,WAAW,KAA4D,CAAC;AAErF;;;;;;;GAOG;AACH,wBAAgB,iBAAiB,CAC/B,aAAa,EAAE,OAAO,GAAG,MAAM,GAAG,MAAM,GAAG,SAAS,EACpD,YAAY,GAAE,MAAW,GACxB;IACD,IAAI,EAAE,QAAQ,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,EAAE,MAAM,CAAC;CACrB,CAqBA;AAMD;;GAEG;AACH,eAAO,MAAM,yBAAyB;;;;;CAKrC,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,uBAAuB;;;;;CAMnC,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,iBAAiB;;;;CAI7B,CAAC"}
|
|
@@ -5,57 +5,77 @@
|
|
|
5
5
|
* Reusable schema components to eliminate duplication across 37 MCP tools.
|
|
6
6
|
* These schemas are imported and composed into tool-specific inputSchema definitions.
|
|
7
7
|
*
|
|
8
|
+
* UNIFIED APPROACH: Uses SDK Zod schemas as single source of truth, converting to JSON Schema for MCP.
|
|
9
|
+
*
|
|
8
10
|
* @see https://modelcontextprotocol.io/docs/concepts/tools
|
|
9
11
|
*/
|
|
10
12
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
11
|
-
exports.SORT_ORDER_SCHEMA = exports.
|
|
13
|
+
exports.SORT_ORDER_SCHEMA = exports.RBC_FEE_SLIPPAGE_SCHEMA = exports.SLIPPAGE_TOLERANCE_SCHEMA = exports.PAGE_SCHEMA = exports.DATE_TIME_SCHEMA = exports.UNIQUE_KEY_SCHEMA = exports.TRANSACTION_ID_SCHEMA = exports.SEARCH_SCHEMA = exports.FULL_NAME_SCHEMA = exports.COMMENT_MESSAGE_SCHEMA = exports.URL_SCHEMA = exports.INTEGER_AMOUNT_SCHEMA = exports.PRE_BUY_QUANTITY_SCHEMA = exports.DECIMAL_AMOUNT_SCHEMA = exports.ADDRESS_SCHEMA = exports.PRIVATE_KEY_SCHEMA = exports.TOKEN_DESCRIPTION_SCHEMA = exports.TOKEN_SYMBOL_SCHEMA = exports.TOKEN_NAME_SCHEMA = void 0;
|
|
12
14
|
exports.createLimitSchema = createLimitSchema;
|
|
15
|
+
const zod_to_json_schema_1 = require("zod-to-json-schema");
|
|
16
|
+
const launchpad_sdk_1 = require("@gala-chain/launchpad-sdk");
|
|
13
17
|
const constraints_js_1 = require("../utils/constraints.js");
|
|
18
|
+
// =============================================================================
|
|
19
|
+
// Helper: Convert Zod schema to MCP-compatible JSON Schema
|
|
20
|
+
// =============================================================================
|
|
21
|
+
/**
|
|
22
|
+
* Converts a Zod schema to JSON Schema format suitable for MCP tool definitions
|
|
23
|
+
* Extracts only the properties we need (type, pattern, description, etc.)
|
|
24
|
+
*/
|
|
25
|
+
function toMCPSchema(zodSchema, customDescription) {
|
|
26
|
+
const jsonSchema = (0, zod_to_json_schema_1.zodToJsonSchema)(zodSchema, { $refStrategy: 'none' });
|
|
27
|
+
// Extract the schema properties (removing $schema metadata)
|
|
28
|
+
const { $schema, ...schemaProps } = jsonSchema;
|
|
29
|
+
// Override description if provided
|
|
30
|
+
if (customDescription) {
|
|
31
|
+
schemaProps.description = customDescription;
|
|
32
|
+
}
|
|
33
|
+
return schemaProps;
|
|
34
|
+
}
|
|
35
|
+
// =============================================================================
|
|
36
|
+
// Token Schemas (from SDK)
|
|
37
|
+
// =============================================================================
|
|
14
38
|
/**
|
|
15
39
|
* Token name schema - used in 11+ tools
|
|
16
|
-
*
|
|
40
|
+
* Generated from SDK tokenNameSchema
|
|
17
41
|
*/
|
|
18
|
-
exports.TOKEN_NAME_SCHEMA =
|
|
19
|
-
type: 'string',
|
|
20
|
-
pattern: '^[a-z0-9_-]{2,20}$',
|
|
21
|
-
description: 'Token name',
|
|
22
|
-
};
|
|
42
|
+
exports.TOKEN_NAME_SCHEMA = toMCPSchema(launchpad_sdk_1.tokenNameSchema, 'Token name');
|
|
23
43
|
/**
|
|
24
44
|
* Token symbol schema - used in creation tools
|
|
25
|
-
*
|
|
45
|
+
* Generated from SDK tokenSymbolSchema
|
|
26
46
|
*/
|
|
27
|
-
exports.TOKEN_SYMBOL_SCHEMA =
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
47
|
+
exports.TOKEN_SYMBOL_SCHEMA = toMCPSchema(launchpad_sdk_1.tokenSymbolSchema, 'Token symbol');
|
|
48
|
+
/**
|
|
49
|
+
* Token description schema
|
|
50
|
+
* Generated from SDK tokenDescriptionSchema
|
|
51
|
+
*/
|
|
52
|
+
exports.TOKEN_DESCRIPTION_SCHEMA = toMCPSchema(launchpad_sdk_1.tokenDescriptionSchema, 'Token description');
|
|
53
|
+
// =============================================================================
|
|
54
|
+
// Authentication & Address Schemas (from SDK)
|
|
55
|
+
// =============================================================================
|
|
32
56
|
/**
|
|
33
57
|
* Private key schema - used in 18+ tools
|
|
34
|
-
*
|
|
58
|
+
* Generated from SDK privateKeySchema
|
|
35
59
|
*/
|
|
36
|
-
exports.PRIVATE_KEY_SCHEMA =
|
|
37
|
-
type: 'string',
|
|
38
|
-
pattern: '^0x[a-fA-F0-9]{64}$',
|
|
39
|
-
description: 'Optional private key override for this operation (format: "0x" + 64 hex characters). If provided, uses this wallet instead of the default MCP server wallet.',
|
|
40
|
-
};
|
|
60
|
+
exports.PRIVATE_KEY_SCHEMA = toMCPSchema(launchpad_sdk_1.privateKeySchema, 'Optional private key override for this operation (format: "0x" + 64 hex characters). If provided, uses this wallet instead of the default MCP server wallet.');
|
|
41
61
|
/**
|
|
42
62
|
* Wallet address schema - supports both Ethereum (0x...) and GalaChain (eth|...) formats
|
|
43
|
-
*
|
|
63
|
+
* Generated from SDK flexibleAddressSchema
|
|
44
64
|
*/
|
|
45
|
-
exports.ADDRESS_SCHEMA =
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
};
|
|
65
|
+
exports.ADDRESS_SCHEMA = toMCPSchema(launchpad_sdk_1.flexibleAddressSchema, 'Wallet address');
|
|
66
|
+
// =============================================================================
|
|
67
|
+
// Amount Schemas (from SDK)
|
|
68
|
+
// =============================================================================
|
|
50
69
|
/**
|
|
51
70
|
* Decimal amount schema - used in trading and transfer tools
|
|
52
|
-
*
|
|
71
|
+
* Generated from SDK positiveDecimalStringSchema
|
|
53
72
|
*/
|
|
54
|
-
exports.DECIMAL_AMOUNT_SCHEMA =
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
73
|
+
exports.DECIMAL_AMOUNT_SCHEMA = toMCPSchema(launchpad_sdk_1.positiveDecimalStringSchema, 'Amount in standard decimal format');
|
|
74
|
+
/**
|
|
75
|
+
* Pre-buy quantity schema - used in token creation
|
|
76
|
+
* Generated from SDK nonNegativeDecimalStringSchema
|
|
77
|
+
*/
|
|
78
|
+
exports.PRE_BUY_QUANTITY_SCHEMA = toMCPSchema(launchpad_sdk_1.nonNegativeDecimalStringSchema, 'Pre-buy quantity as decimal string (defaults to "0")');
|
|
59
79
|
/**
|
|
60
80
|
* Integer amount schema - used in token transfers
|
|
61
81
|
* Pattern: positive integer string
|
|
@@ -65,23 +85,55 @@ exports.INTEGER_AMOUNT_SCHEMA = {
|
|
|
65
85
|
pattern: '^[0-9]+$',
|
|
66
86
|
description: 'Token amount',
|
|
67
87
|
};
|
|
88
|
+
// =============================================================================
|
|
89
|
+
// URL & Text Schemas (from SDK)
|
|
90
|
+
// =============================================================================
|
|
68
91
|
/**
|
|
69
92
|
* URL schema - used for social URLs and token images
|
|
93
|
+
* Generated from SDK urlSchema
|
|
70
94
|
*/
|
|
71
|
-
exports.URL_SCHEMA =
|
|
72
|
-
type: 'string',
|
|
73
|
-
format: 'uri',
|
|
74
|
-
};
|
|
95
|
+
exports.URL_SCHEMA = toMCPSchema(launchpad_sdk_1.urlSchema);
|
|
75
96
|
/**
|
|
76
|
-
*
|
|
97
|
+
* Comment message schema
|
|
98
|
+
* Generated from SDK commentMessageSchema
|
|
77
99
|
*/
|
|
78
|
-
exports.
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
100
|
+
exports.COMMENT_MESSAGE_SCHEMA = toMCPSchema(launchpad_sdk_1.commentMessageSchema, 'Comment message text');
|
|
101
|
+
/**
|
|
102
|
+
* Profile name schema
|
|
103
|
+
* Generated from SDK fullNameSchema
|
|
104
|
+
*/
|
|
105
|
+
exports.FULL_NAME_SCHEMA = toMCPSchema(launchpad_sdk_1.fullNameSchema, 'Full name');
|
|
106
|
+
/**
|
|
107
|
+
* Search query schema - used in user tools
|
|
108
|
+
* Generated from SDK searchQuerySchema
|
|
109
|
+
*/
|
|
110
|
+
exports.SEARCH_SCHEMA = toMCPSchema(launchpad_sdk_1.searchQuerySchema, 'Optional search query (fuzzy match filter)');
|
|
111
|
+
/**
|
|
112
|
+
* Transaction ID schema - used for getBundlerTransactionResult
|
|
113
|
+
* Generated from SDK transactionIdSchema
|
|
114
|
+
*/
|
|
115
|
+
exports.TRANSACTION_ID_SCHEMA = toMCPSchema(launchpad_sdk_1.transactionIdSchema, 'Transaction ID (UUID format) from buy(), sell(), or launchToken()');
|
|
116
|
+
/**
|
|
117
|
+
* Idempotency key schema - used in transfer tools
|
|
118
|
+
* Generated from SDK uniqueKeySchema
|
|
119
|
+
*/
|
|
120
|
+
exports.UNIQUE_KEY_SCHEMA = toMCPSchema(launchpad_sdk_1.uniqueKeySchema, 'Optional idempotency key');
|
|
121
|
+
/**
|
|
122
|
+
* Date-time schema - used in trade and volume queries
|
|
123
|
+
* Generated from SDK isoDateStringSchema
|
|
124
|
+
*/
|
|
125
|
+
exports.DATE_TIME_SCHEMA = toMCPSchema(launchpad_sdk_1.isoDateStringSchema);
|
|
126
|
+
// =============================================================================
|
|
127
|
+
// Pagination Schemas (from SDK)
|
|
128
|
+
// =============================================================================
|
|
129
|
+
/**
|
|
130
|
+
* Page number schema - used in ~15 tools
|
|
131
|
+
* Generated from SDK pageNumberSchema
|
|
132
|
+
*/
|
|
133
|
+
exports.PAGE_SCHEMA = toMCPSchema(launchpad_sdk_1.pageNumberSchema, 'Page number (default: 1)');
|
|
83
134
|
/**
|
|
84
135
|
* Creates a limit schema with operation-specific maximum
|
|
136
|
+
* Uses SDK Zod schemas and converts to JSON Schema
|
|
85
137
|
*
|
|
86
138
|
* @param operationType - The type of operation (trade, user, pool, comment)
|
|
87
139
|
* @param defaultLimit - Default limit value (typically 20)
|
|
@@ -94,70 +146,14 @@ function createLimitSchema(operationType, defaultLimit = 20) {
|
|
|
94
146
|
pool: constraints_js_1.MCP_CONSTRAINTS.POOL_LIMIT, // 100
|
|
95
147
|
comment: constraints_js_1.MCP_CONSTRAINTS.COMMENT_LIMIT, // 50
|
|
96
148
|
};
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
description: `Results per page (default: ${defaultLimit}, maximum: ${maxLimits[operationType]})`,
|
|
102
|
-
};
|
|
149
|
+
// Use SDK Zod createLimitSchema and convert to JSON Schema
|
|
150
|
+
const zodLimit = (0, launchpad_sdk_1.createLimitSchema)(maxLimits[operationType]);
|
|
151
|
+
const jsonSchemaLimit = toMCPSchema(zodLimit, `Results per page (default: ${defaultLimit}, maximum: ${maxLimits[operationType]})`);
|
|
152
|
+
return jsonSchemaLimit;
|
|
103
153
|
}
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
*/
|
|
108
|
-
exports.TRANSACTION_ID_SCHEMA = {
|
|
109
|
-
type: 'string',
|
|
110
|
-
pattern: '^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$',
|
|
111
|
-
description: 'Transaction ID (UUID format) from buy(), sell(), or launchToken()',
|
|
112
|
-
};
|
|
113
|
-
/**
|
|
114
|
-
* Idempotency key schema - used in transfer tools
|
|
115
|
-
*/
|
|
116
|
-
exports.UNIQUE_KEY_SCHEMA = {
|
|
117
|
-
type: 'string',
|
|
118
|
-
pattern: '^galaconnect-operation-[a-z0-9-]+$',
|
|
119
|
-
description: 'Optional idempotency key',
|
|
120
|
-
};
|
|
121
|
-
/**
|
|
122
|
-
* Comment message schema
|
|
123
|
-
*/
|
|
124
|
-
exports.COMMENT_MESSAGE_SCHEMA = {
|
|
125
|
-
type: 'string',
|
|
126
|
-
maxLength: 500,
|
|
127
|
-
description: 'Comment message text',
|
|
128
|
-
};
|
|
129
|
-
/**
|
|
130
|
-
* Profile name schema
|
|
131
|
-
*/
|
|
132
|
-
exports.FULL_NAME_SCHEMA = {
|
|
133
|
-
type: 'string',
|
|
134
|
-
maxLength: 50,
|
|
135
|
-
pattern: '^[a-zA-Z\\s]+$',
|
|
136
|
-
description: 'Full name',
|
|
137
|
-
};
|
|
138
|
-
/**
|
|
139
|
-
* Search query schema - used in user tools
|
|
140
|
-
*/
|
|
141
|
-
exports.SEARCH_SCHEMA = {
|
|
142
|
-
type: 'string',
|
|
143
|
-
description: 'Optional search query (fuzzy match filter)',
|
|
144
|
-
};
|
|
145
|
-
/**
|
|
146
|
-
* Pre-buy quantity schema - used in token creation
|
|
147
|
-
*/
|
|
148
|
-
exports.PRE_BUY_QUANTITY_SCHEMA = {
|
|
149
|
-
type: 'string',
|
|
150
|
-
pattern: '^[0-9.]+$',
|
|
151
|
-
description: 'Pre-buy quantity as decimal string (defaults to "0")',
|
|
152
|
-
};
|
|
153
|
-
/**
|
|
154
|
-
* Token description schema
|
|
155
|
-
*/
|
|
156
|
-
exports.TOKEN_DESCRIPTION_SCHEMA = {
|
|
157
|
-
type: 'string',
|
|
158
|
-
maxLength: 500,
|
|
159
|
-
description: 'Token description',
|
|
160
|
-
};
|
|
154
|
+
// =============================================================================
|
|
155
|
+
// Trading Schemas (manual - not in SDK primitives)
|
|
156
|
+
// =============================================================================
|
|
161
157
|
/**
|
|
162
158
|
* Slippage tolerance factor schema
|
|
163
159
|
*/
|
|
@@ -176,13 +172,6 @@ exports.RBC_FEE_SLIPPAGE_SCHEMA = {
|
|
|
176
172
|
maximum: 1,
|
|
177
173
|
description: 'Optional slippage tolerance for reverse bonding curve fee (decimal, e.g., 0.01 for 1%). Defaults to 0.01 (1%) if not provided. Applied to maxAcceptableReverseBondingCurveFee to increase max acceptable fee.',
|
|
178
174
|
};
|
|
179
|
-
/**
|
|
180
|
-
* Date-time schema - used in trade and volume queries
|
|
181
|
-
*/
|
|
182
|
-
exports.DATE_TIME_SCHEMA = {
|
|
183
|
-
type: 'string',
|
|
184
|
-
format: 'date-time',
|
|
185
|
-
};
|
|
186
175
|
/**
|
|
187
176
|
* Sort order schema
|
|
188
177
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"common-schemas.js","sourceRoot":"","sources":["../../src/schemas/common-schemas.ts"],"names":[],"mappings":";AAAA
|
|
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,mB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;IACrB,WAAW,EAAE,4BAA4B;CAC1C,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gala-chain/launchpad-mcp-server",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.6",
|
|
4
4
|
"description": "MCP server for Gala Launchpad SDK with 37 tools - AI agents can interact with Gala Launchpad",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"bin": {
|
|
@@ -56,8 +56,10 @@
|
|
|
56
56
|
"registry": "https://registry.npmjs.org/"
|
|
57
57
|
},
|
|
58
58
|
"dependencies": {
|
|
59
|
-
"@gala-chain/launchpad-sdk": "^3.
|
|
60
|
-
"@modelcontextprotocol/sdk": "^0.5.0"
|
|
59
|
+
"@gala-chain/launchpad-sdk": "^3.6.0",
|
|
60
|
+
"@modelcontextprotocol/sdk": "^0.5.0",
|
|
61
|
+
"zod": "^3.25.76",
|
|
62
|
+
"zod-to-json-schema": "^3.24.6"
|
|
61
63
|
},
|
|
62
64
|
"devDependencies": {
|
|
63
65
|
"@types/node": "^20.0.0",
|