@gala-chain/launchpad-mcp-server 1.2.3 → 1.2.5

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
@@ -5,6 +5,23 @@ All notable changes to the Gala Launchpad MCP Server will be documented in this
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [1.2.4] - 2025-10-02
9
+
10
+ ### Changed
11
+ - **Internal code quality improvements** - Schema consolidation across all 37 MCP tools
12
+ - Created centralized `common-schemas.ts` with 15+ reusable schema definitions
13
+ - Updated all tools to use shared schemas (TOKEN_NAME_SCHEMA, PRIVATE_KEY_SCHEMA, etc.)
14
+ - Added `createLimitSchema()` function for operation-specific pagination constraints
15
+ - Eliminated ~50+ inline schema repetitions across 7 tool categories
16
+ - No breaking changes - 100% backward compatible with all AI agents
17
+ - Updated SDK dependency from ^3.5.1 to ^3.5.2
18
+
19
+ ### Benefits
20
+ - ✅ Improved code maintainability and consistency
21
+ - ✅ Single source of truth for all schema definitions
22
+ - ✅ Easier to maintain and update validation rules
23
+ - ✅ All tools tested and working with Claude Desktop
24
+
8
25
  ## [1.2.3] - 2025-10-01
9
26
 
10
27
  ### Documentation
@@ -0,0 +1,135 @@
1
+ /**
2
+ * Common MCP Tool Schema Definitions
3
+ *
4
+ * Reusable schema components to eliminate duplication across 37 MCP tools.
5
+ * These schemas are imported and composed into tool-specific inputSchema definitions.
6
+ *
7
+ * UNIFIED APPROACH: Uses SDK Zod schemas as single source of truth, converting to JSON Schema for MCP.
8
+ *
9
+ * @see https://modelcontextprotocol.io/docs/concepts/tools
10
+ */
11
+ /**
12
+ * Token name schema - used in 11+ tools
13
+ * Generated from SDK tokenNameSchema
14
+ */
15
+ export declare const TOKEN_NAME_SCHEMA: any;
16
+ /**
17
+ * Token symbol schema - used in creation tools
18
+ * Generated from SDK tokenSymbolSchema
19
+ */
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;
26
+ /**
27
+ * Private key schema - used in 18+ tools
28
+ * Generated from SDK privateKeySchema
29
+ */
30
+ export declare const PRIVATE_KEY_SCHEMA: any;
31
+ /**
32
+ * Wallet address schema - supports both Ethereum (0x...) and GalaChain (eth|...) formats
33
+ * Generated from SDK flexibleAddressSchema
34
+ */
35
+ export declare const ADDRESS_SCHEMA: any;
36
+ /**
37
+ * Decimal amount schema - used in trading and transfer tools
38
+ * Generated from SDK positiveDecimalStringSchema
39
+ */
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;
46
+ /**
47
+ * Integer amount schema - used in token transfers
48
+ * Pattern: positive integer string
49
+ */
50
+ export declare const INTEGER_AMOUNT_SCHEMA: {
51
+ type: "string";
52
+ pattern: string;
53
+ description: string;
54
+ };
55
+ /**
56
+ * URL schema - used for social URLs and token images
57
+ * Generated from SDK urlSchema
58
+ */
59
+ export declare const URL_SCHEMA: any;
60
+ /**
61
+ * Comment message schema
62
+ * Generated from SDK commentMessageSchema
63
+ */
64
+ export declare const COMMENT_MESSAGE_SCHEMA: any;
65
+ /**
66
+ * Profile name schema
67
+ * Generated from SDK fullNameSchema
68
+ */
69
+ export declare const FULL_NAME_SCHEMA: any;
70
+ /**
71
+ * Search query schema - used in user tools
72
+ * Generated from SDK searchQuerySchema
73
+ */
74
+ export declare const SEARCH_SCHEMA: any;
75
+ /**
76
+ * Transaction ID schema - used for getBundlerTransactionResult
77
+ * Generated from SDK transactionIdSchema
78
+ */
79
+ export declare const TRANSACTION_ID_SCHEMA: any;
80
+ /**
81
+ * Idempotency key schema - used in transfer tools
82
+ * Generated from SDK uniqueKeySchema
83
+ */
84
+ export declare const UNIQUE_KEY_SCHEMA: any;
85
+ /**
86
+ * Date-time schema - used in trade and volume queries
87
+ * Generated from SDK isoDateStringSchema
88
+ */
89
+ export declare const DATE_TIME_SCHEMA: any;
90
+ /**
91
+ * Page number schema - used in ~15 tools
92
+ * Generated from SDK pageNumberSchema
93
+ */
94
+ export declare const PAGE_SCHEMA: any;
95
+ /**
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
102
+ */
103
+ export declare function createLimitSchema(operationType: 'trade' | 'user' | 'pool' | 'comment', defaultLimit?: number): {
104
+ type: 'number';
105
+ minimum: number;
106
+ maximum: number;
107
+ description: string;
108
+ };
109
+ /**
110
+ * Slippage tolerance factor schema
111
+ */
112
+ export declare const SLIPPAGE_TOLERANCE_SCHEMA: {
113
+ type: "number";
114
+ minimum: number;
115
+ maximum: number;
116
+ description: string;
117
+ };
118
+ /**
119
+ * Reverse bonding curve fee slippage schema
120
+ */
121
+ export declare const RBC_FEE_SLIPPAGE_SCHEMA: {
122
+ type: "number";
123
+ minimum: number;
124
+ maximum: number;
125
+ description: string;
126
+ };
127
+ /**
128
+ * Sort order schema
129
+ */
130
+ export declare const SORT_ORDER_SCHEMA: {
131
+ type: "string";
132
+ enum: string[];
133
+ description: string;
134
+ };
135
+ //# sourceMappingURL=common-schemas.d.ts.map
@@ -0,0 +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,eA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* Reusable schema components to eliminate duplication across 37 MCP tools.
6
+ * These schemas are imported and composed into tool-specific inputSchema definitions.
7
+ *
8
+ * UNIFIED APPROACH: Uses SDK Zod schemas as single source of truth, converting to JSON Schema for MCP.
9
+ *
10
+ * @see https://modelcontextprotocol.io/docs/concepts/tools
11
+ */
12
+ Object.defineProperty(exports, "__esModule", { value: true });
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;
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");
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
+ // =============================================================================
38
+ /**
39
+ * Token name schema - used in 11+ tools
40
+ * Generated from SDK tokenNameSchema
41
+ */
42
+ exports.TOKEN_NAME_SCHEMA = toMCPSchema(launchpad_sdk_1.tokenNameSchema, 'Token name');
43
+ /**
44
+ * Token symbol schema - used in creation tools
45
+ * Generated from SDK tokenSymbolSchema
46
+ */
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
+ // =============================================================================
56
+ /**
57
+ * Private key schema - used in 18+ tools
58
+ * Generated from SDK privateKeySchema
59
+ */
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.');
61
+ /**
62
+ * Wallet address schema - supports both Ethereum (0x...) and GalaChain (eth|...) formats
63
+ * Generated from SDK flexibleAddressSchema
64
+ */
65
+ exports.ADDRESS_SCHEMA = toMCPSchema(launchpad_sdk_1.flexibleAddressSchema, 'Wallet address');
66
+ // =============================================================================
67
+ // Amount Schemas (from SDK)
68
+ // =============================================================================
69
+ /**
70
+ * Decimal amount schema - used in trading and transfer tools
71
+ * Generated from SDK positiveDecimalStringSchema
72
+ */
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")');
79
+ /**
80
+ * Integer amount schema - used in token transfers
81
+ * Pattern: positive integer string
82
+ */
83
+ exports.INTEGER_AMOUNT_SCHEMA = {
84
+ type: 'string',
85
+ pattern: '^[0-9]+$',
86
+ description: 'Token amount',
87
+ };
88
+ // =============================================================================
89
+ // URL & Text Schemas (from SDK)
90
+ // =============================================================================
91
+ /**
92
+ * URL schema - used for social URLs and token images
93
+ * Generated from SDK urlSchema
94
+ */
95
+ exports.URL_SCHEMA = toMCPSchema(launchpad_sdk_1.urlSchema);
96
+ /**
97
+ * Comment message schema
98
+ * Generated from SDK commentMessageSchema
99
+ */
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)');
134
+ /**
135
+ * Creates a limit schema with operation-specific maximum
136
+ * Uses SDK Zod schemas and converts to JSON Schema
137
+ *
138
+ * @param operationType - The type of operation (trade, user, pool, comment)
139
+ * @param defaultLimit - Default limit value (typically 20)
140
+ * @returns Limit schema with appropriate maximum
141
+ */
142
+ function createLimitSchema(operationType, defaultLimit = 20) {
143
+ const maxLimits = {
144
+ trade: constraints_js_1.MCP_CONSTRAINTS.TRADE_LIMIT, // 20
145
+ user: constraints_js_1.MCP_CONSTRAINTS.USER_LIMIT, // 20
146
+ pool: constraints_js_1.MCP_CONSTRAINTS.POOL_LIMIT, // 100
147
+ comment: constraints_js_1.MCP_CONSTRAINTS.COMMENT_LIMIT, // 50
148
+ };
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;
153
+ }
154
+ // =============================================================================
155
+ // Trading Schemas (manual - not in SDK primitives)
156
+ // =============================================================================
157
+ /**
158
+ * Slippage tolerance factor schema
159
+ */
160
+ exports.SLIPPAGE_TOLERANCE_SCHEMA = {
161
+ type: 'number',
162
+ minimum: 0,
163
+ maximum: 1,
164
+ description: 'Decimal format (0.05 = 5% slippage)',
165
+ };
166
+ /**
167
+ * Reverse bonding curve fee slippage schema
168
+ */
169
+ exports.RBC_FEE_SLIPPAGE_SCHEMA = {
170
+ type: 'number',
171
+ minimum: 0,
172
+ maximum: 1,
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.',
174
+ };
175
+ /**
176
+ * Sort order schema
177
+ */
178
+ exports.SORT_ORDER_SCHEMA = {
179
+ type: 'string',
180
+ enum: ['ASC', 'DESC'],
181
+ description: 'Sort order (default: DESC)',
182
+ };
183
+ //# sourceMappingURL=common-schemas.js.map
@@ -0,0 +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,kB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AM,oBAAoB,EAAE,OAiBlC,CAAC;AAGF,eAAO,MAAM,qBAAqB,EAAE,OA2BnC,CAAC;AAGF,eAAO,MAAM,mBAAmB,EAAE,OA4CjC,CAAC;AAGF,eAAO,MAAM,sBAAsB,EAAE,OA4CpC,CAAC;AAGF,eAAO,MAAM,gBAAgB,EAAE,OAiB9B,CAAC;AAGF,eAAO,MAAM,iBAAiB,EAAE,OAsC/B,CAAC;AAEF,eAAO,MAAM,YAAY,EAAE,OAAO,EAOjC,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/tools/balance/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAclD,eAAO,MAAM,oBAAoB,EAAE,OAgBlC,CAAC;AAGF,eAAO,MAAM,qBAAqB,EAAE,OAmBnC,CAAC;AAGF,eAAO,MAAM,mBAAmB,EAAE,OA2BjC,CAAC;AAGF,eAAO,MAAM,sBAAsB,EAAE,OA2BpC,CAAC;AAGF,eAAO,MAAM,gBAAgB,EAAE,OAgB9B,CAAC;AAGF,eAAO,MAAM,iBAAiB,EAAE,OAyB/B,CAAC;AAEF,eAAO,MAAM,YAAY,EAAE,OAAO,EAOjC,CAAC"}
@@ -6,6 +6,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.balanceTools = exports.updateProfileTool = exports.fetchProfileTool = exports.fetchTokensCreatedTool = exports.fetchTokensHeldTool = exports.fetchTokenBalanceTool = exports.fetchGalaBalanceTool = void 0;
7
7
  const response_formatter_js_1 = require("../../utils/response-formatter.js");
8
8
  const error_handler_js_1 = require("../../utils/error-handler.js");
9
+ const common_schemas_js_1 = require("../../schemas/common-schemas.js");
9
10
  // 1. Fetch GALA Balance
10
11
  exports.fetchGalaBalanceTool = {
11
12
  name: 'gala_launchpad_fetch_gala_balance',
@@ -14,8 +15,7 @@ exports.fetchGalaBalanceTool = {
14
15
  type: 'object',
15
16
  properties: {
16
17
  address: {
17
- type: 'string',
18
- pattern: '^(0x[a-fA-F0-9]{40}|eth\\|[a-fA-F0-9]{40})$',
18
+ ...common_schemas_js_1.ADDRESS_SCHEMA,
19
19
  description: 'Wallet address (optional, defaults to SDK wallet)',
20
20
  },
21
21
  },
@@ -32,16 +32,8 @@ exports.fetchTokenBalanceTool = {
32
32
  inputSchema: {
33
33
  type: 'object',
34
34
  properties: {
35
- tokenName: {
36
- type: 'string',
37
- pattern: '^[a-z0-9_-]{2,20}$',
38
- description: 'Token name',
39
- },
40
- address: {
41
- type: 'string',
42
- pattern: '^(0x[a-fA-F0-9]{40}|eth\\|[a-fA-F0-9]{40})$',
43
- description: 'Wallet address',
44
- },
35
+ tokenName: common_schemas_js_1.TOKEN_NAME_SCHEMA,
36
+ address: common_schemas_js_1.ADDRESS_SCHEMA,
45
37
  },
46
38
  required: ['tokenName', 'address'],
47
39
  },
@@ -61,31 +53,14 @@ exports.fetchTokensHeldTool = {
61
53
  inputSchema: {
62
54
  type: 'object',
63
55
  properties: {
64
- address: {
65
- type: 'string',
66
- pattern: '^(0x[a-fA-F0-9]{40}|eth\\|[a-fA-F0-9]{40})$',
67
- description: 'Wallet address',
68
- },
69
- page: {
70
- type: 'number',
71
- minimum: 1,
72
- description: 'Page number (default: 1)',
73
- },
74
- limit: {
75
- type: 'number',
76
- minimum: 1,
77
- maximum: 20, // USER_CONSTRAINTS.PAGINATION.MAX_LIMIT from SDK
78
- description: 'Results per page (default: 20, maximum: 20)',
79
- },
56
+ address: common_schemas_js_1.ADDRESS_SCHEMA,
57
+ page: common_schemas_js_1.PAGE_SCHEMA,
58
+ limit: (0, common_schemas_js_1.createLimitSchema)('user', 20),
80
59
  tokenName: {
81
- type: 'string',
82
- pattern: '^[a-z0-9_-]{2,20}$',
60
+ ...common_schemas_js_1.TOKEN_NAME_SCHEMA,
83
61
  description: 'Optional token name (exact match filter)',
84
62
  },
85
- search: {
86
- type: 'string',
87
- description: 'Optional search query (fuzzy match filter)',
88
- },
63
+ search: common_schemas_js_1.SEARCH_SCHEMA,
89
64
  },
90
65
  required: ['address'],
91
66
  },
@@ -107,31 +82,14 @@ exports.fetchTokensCreatedTool = {
107
82
  inputSchema: {
108
83
  type: 'object',
109
84
  properties: {
110
- address: {
111
- type: 'string',
112
- pattern: '^(0x[a-fA-F0-9]{40}|eth\\|[a-fA-F0-9]{40})$',
113
- description: 'Wallet address',
114
- },
115
- page: {
116
- type: 'number',
117
- minimum: 1,
118
- description: 'Page number (default: 1)',
119
- },
120
- limit: {
121
- type: 'number',
122
- minimum: 1,
123
- maximum: 20, // USER_CONSTRAINTS.PAGINATION.MAX_LIMIT from SDK
124
- description: 'Results per page (default: 20, maximum: 20)',
125
- },
85
+ address: common_schemas_js_1.ADDRESS_SCHEMA,
86
+ page: common_schemas_js_1.PAGE_SCHEMA,
87
+ limit: (0, common_schemas_js_1.createLimitSchema)('user', 20),
126
88
  tokenName: {
127
- type: 'string',
128
- pattern: '^[a-z0-9_-]{2,20}$',
89
+ ...common_schemas_js_1.TOKEN_NAME_SCHEMA,
129
90
  description: 'Optional token name (exact match filter)',
130
91
  },
131
- search: {
132
- type: 'string',
133
- description: 'Optional search query (fuzzy match filter)',
134
- },
92
+ search: common_schemas_js_1.SEARCH_SCHEMA,
135
93
  },
136
94
  required: ['address'],
137
95
  },
@@ -154,8 +112,7 @@ exports.fetchProfileTool = {
154
112
  type: 'object',
155
113
  properties: {
156
114
  address: {
157
- type: 'string',
158
- pattern: '^(0x[a-fA-F0-9]{40}|eth\\|[a-fA-F0-9]{40})$',
115
+ ...common_schemas_js_1.ADDRESS_SCHEMA,
159
116
  description: 'Wallet address (optional, defaults to SDK wallet)',
160
117
  },
161
118
  },
@@ -172,26 +129,13 @@ exports.updateProfileTool = {
172
129
  inputSchema: {
173
130
  type: 'object',
174
131
  properties: {
175
- fullName: {
176
- type: 'string',
177
- maxLength: 50,
178
- pattern: '^[a-zA-Z\\s]+$',
179
- description: 'Full name',
180
- },
132
+ fullName: common_schemas_js_1.FULL_NAME_SCHEMA,
181
133
  profileImage: {
182
134
  type: 'string',
183
135
  description: 'Profile image URL or empty string',
184
136
  },
185
- address: {
186
- type: 'string',
187
- pattern: '^(0x[a-fA-F0-9]{40}|eth\\|[a-fA-F0-9]{40})$',
188
- description: 'Wallet address',
189
- },
190
- privateKey: {
191
- type: 'string',
192
- pattern: '^0x[a-fA-F0-9]{64}$',
193
- 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.',
194
- },
137
+ address: common_schemas_js_1.ADDRESS_SCHEMA,
138
+ privateKey: common_schemas_js_1.PRIVATE_KEY_SCHEMA,
195
139
  },
196
140
  required: ['fullName', 'profileImage', 'address'],
197
141
  },
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/tools/balance/index.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAGH,6EAAiF;AACjF,mEAAiE;AAEjE,wBAAwB;AACX,QAAA,oBAAoB,GAAY;IAC3C,IAAI,EAAE,mCAAmC;IACzC,WAAW,EAAE,+BAA+B;IAC5C,WAAW,EAAE;QACX,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE;YACV,OAAO,EAAE;gBACP,IAAI,EAAE,QAAQ;gBACd,OAAO,EAAE,6CAA6C;gBACtD,WAAW,EAAE,mDAAmD;aACjE;SACF;KACF;IACD,OAAO,EAAE,IAAA,oCAAiB,EAAC,KAAK,EAAE,GAAG,EAAE,IAAI,EAAE,EAAE;QAC7C,MAAM,MAAM,GAAG,MAAM,GAAG,CAAC,gBAAgB,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QACxD,OAAO,IAAA,qCAAa,EAAC,MAAM,CAAC,CAAC;IAC/B,CAAC,CAAC;CACH,CAAC;AAEF,yDAAyD;AAC5C,QAAA,qBAAqB,GAAY;IAC5C,IAAI,EAAE,oCAAoC;IAC1C,WAAW,EAAE,2LAA2L;IACxM,WAAW,EAAE;QACX,IA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AAC;QACH,OAAO,IAAA,qCAAa,EAAC,IAAI,EAAE,8BAA8B,CAAC,CAAC;IAC7D,CAAC,CAAC;CACH,CAAC;AAEW,QAAA,YAAY,GAAc;IACrC,4BAAoB;IACpB,6BAAqB;IACrB,2BAAmB;IACnB,8BAAsB;IACtB,wBAAgB;IAChB,yBAAiB;CAClB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/tools/creation/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAKlD,eAAO,MAAM,eAAe,EAAE,OA+F7B,CAAC;AAGF,eAAO,MAAM,oBAAoB,EAAE,OAqClC,CAAC;AAGF,eAAO,MAAM,sBAAsB,EAAE,OA2CpC,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,OAAO,EAIlC,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/tools/creation/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAclD,eAAO,MAAM,eAAe,EAAE,OAuE7B,CAAC;AAGF,eAAO,MAAM,oBAAoB,EAAE,OAgClC,CAAC;AAGF,eAAO,MAAM,sBAAsB,EAAE,OAsCpC,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,OAAO,EAIlC,CAAC"}
@@ -39,6 +39,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
39
39
  exports.creationTools = exports.uploadProfileImageTool = exports.uploadTokenImageTool = exports.launchTokenTool = void 0;
40
40
  const response_formatter_js_1 = require("../../utils/response-formatter.js");
41
41
  const error_handler_js_1 = require("../../utils/error-handler.js");
42
+ const common_schemas_js_1 = require("../../schemas/common-schemas.js");
42
43
  // 1. Launch Token
43
44
  exports.launchTokenTool = {
44
45
  name: 'gala_launchpad_launch_token',
@@ -56,44 +57,24 @@ RETURNS: Transaction details including token name, symbol, creator address, and
56
57
  inputSchema: {
57
58
  type: 'object',
58
59
  properties: {
59
- tokenName: {
60
- type: 'string',
61
- pattern: '^[a-z0-9_-]{2,20}$',
62
- description: 'Token name',
63
- },
64
- tokenSymbol: {
65
- type: 'string',
66
- pattern: '^[A-Z0-9]{2,10}$',
67
- description: 'Token symbol',
68
- },
69
- tokenDescription: {
70
- type: 'string',
71
- maxLength: 500,
72
- description: 'Token description',
73
- },
60
+ tokenName: common_schemas_js_1.TOKEN_NAME_SCHEMA,
61
+ tokenSymbol: common_schemas_js_1.TOKEN_SYMBOL_SCHEMA,
62
+ tokenDescription: common_schemas_js_1.TOKEN_DESCRIPTION_SCHEMA,
74
63
  tokenImage: {
75
- type: 'string',
76
- format: 'uri',
64
+ ...common_schemas_js_1.URL_SCHEMA,
77
65
  description: 'Token image URL',
78
66
  },
79
- preBuyQuantity: {
80
- type: 'string',
81
- pattern: '^[0-9.]+$',
82
- description: 'Pre-buy quantity as decimal string (defaults to "0")',
83
- },
67
+ preBuyQuantity: common_schemas_js_1.PRE_BUY_QUANTITY_SCHEMA,
84
68
  websiteUrl: {
85
- type: 'string',
86
- format: 'uri',
69
+ ...common_schemas_js_1.URL_SCHEMA,
87
70
  description: 'Website URL (optional)',
88
71
  },
89
72
  telegramUrl: {
90
- type: 'string',
91
- format: 'uri',
73
+ ...common_schemas_js_1.URL_SCHEMA,
92
74
  description: 'Telegram channel URL (optional)',
93
75
  },
94
76
  twitterUrl: {
95
- type: 'string',
96
- format: 'uri',
77
+ ...common_schemas_js_1.URL_SCHEMA,
97
78
  description: 'Twitter profile URL (optional)',
98
79
  },
99
80
  tokenCategory: {
@@ -118,11 +99,7 @@ RETURNS: Transaction details including token name, symbol, creator address, and
118
99
  },
119
100
  description: 'Reverse bonding curve configuration (optional, uses defaults)',
120
101
  },
121
- privateKey: {
122
- type: 'string',
123
- pattern: '^0x[a-fA-F0-9]{64}$',
124
- 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.',
125
- },
102
+ privateKey: common_schemas_js_1.PRIVATE_KEY_SCHEMA,
126
103
  },
127
104
  required: [
128
105
  'tokenName',
@@ -144,19 +121,14 @@ exports.uploadTokenImageTool = {
144
121
  type: 'object',
145
122
  properties: {
146
123
  tokenName: {
147
- type: 'string',
148
- pattern: '^[a-z0-9_-]{2,20}$',
124
+ ...common_schemas_js_1.TOKEN_NAME_SCHEMA,
149
125
  description: 'Token name (2-20 lowercase alphanumeric)',
150
126
  },
151
127
  imagePath: {
152
128
  type: 'string',
153
129
  description: 'Absolute file path to image file',
154
130
  },
155
- privateKey: {
156
- type: 'string',
157
- pattern: '^0x[a-fA-F0-9]{64}$',
158
- 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.',
159
- },
131
+ privateKey: common_schemas_js_1.PRIVATE_KEY_SCHEMA,
160
132
  },
161
133
  required: ['tokenName', 'imagePath'],
162
134
  },
@@ -186,15 +158,10 @@ exports.uploadProfileImageTool = {
186
158
  description: 'Absolute file path to image file',
187
159
  },
188
160
  address: {
189
- type: 'string',
190
- pattern: '^(0x[a-fA-F0-9]{40}|eth\\|[a-fA-F0-9]{40})$',
161
+ ...common_schemas_js_1.ADDRESS_SCHEMA,
191
162
  description: 'Optional wallet address (defaults to authenticated user)',
192
163
  },
193
- privateKey: {
194
- type: 'string',
195
- pattern: '^0x[a-fA-F0-9]{64}$',
196
- 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.',
197
- },
164
+ privateKey: common_schemas_js_1.PRIVATE_KEY_SCHEMA,
198
165
  },
199
166
  required: ['imagePath'],
200
167
  },