UNPKG

@gala-chain/launchpad-mcp-server

Version:

MCP server for Gala Launchpad - 102 tools (pool management, event watchers, GSwap DEX trading, price history, token creation, wallet management, DEX pool discovery, liquidity positions, token locks, locked token queries, composite pool data, cross-chain b

287 lines 9.03 kB
/** * Common MCP Tool Schema Definitions * * Reusable schema components to eliminate duplication across 37 MCP tools. * These schemas are imported and composed into tool-specific inputSchema definitions. * * UNIFIED APPROACH: Uses SDK Zod schemas as single source of truth, converting to JSON Schema for MCP. * * @see https://modelcontextprotocol.io/docs/concepts/tools */ /** * Token name schema - used in 11+ tools * * @description Generated from SDK tokenNameSchema * @pattern ^[a-zA-Z0-9]{3,20}$ * @minLength 3 * @maxLength 20 * @example "boba", "testtoken", "mytoken123" */ export declare const TOKEN_NAME_SCHEMA: Record<string, unknown>; /** * Token symbol schema - used in creation tools * * @description Generated from SDK tokenSymbolSchema * @pattern ^[A-Z]{1,8}$ * @minLength 1 * @maxLength 8 * @example "GALA", "TEST", "MTK" */ export declare const TOKEN_SYMBOL_SCHEMA: Record<string, unknown>; /** * Token description schema * * @description Generated from SDK tokenDescriptionSchema * @minLength 1 * @maxLength 500 * @example "A revolutionary new token for decentralized gaming" */ export declare const TOKEN_DESCRIPTION_SCHEMA: Record<string, unknown>; /** * Private key schema - used in 18+ tools * * @description Generated from SDK privateKeySchema * @pattern ^0x[a-fA-F0-9]{64}$ * @example "0xabcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890" * @security Sensitive - should never be logged or exposed */ export declare const PRIVATE_KEY_SCHEMA: Record<string, unknown>; /** * Wallet address schema - supports both Ethereum (0x...) and GalaChain (eth|...) formats * * @description Generated from SDK flexibleAddressSchema * @example "0x1234567890abcdef1234567890abcdef12345678" * @example "eth|1234567890abcdef1234567890abcdef12345678" */ export declare const ADDRESS_SCHEMA: Record<string, unknown>; /** * Decimal amount schema - used in trading and transfer tools * * @description Generated from SDK positiveDecimalStringSchema * @pattern ^\d+(\.\d+)?$ * @example "100", "1.5", "0.001" * @note Must be positive (greater than zero) */ export declare const DECIMAL_AMOUNT_SCHEMA: Record<string, unknown>; /** * Pre-buy quantity schema - used in token creation * * @description Generated from SDK nonNegativeDecimalStringSchema * @pattern ^\d+(\.\d+)?$ * @example "0", "100", "1500.5" * @note Can be zero or positive (non-negative) */ export declare const PRE_BUY_QUANTITY_SCHEMA: Record<string, unknown>; /** * Integer amount schema - used in token transfers * * @description Manual schema (not from SDK primitives) * @pattern ^[0-9]+$ * @example "100", "1000", "5000000" * @note Integer only (no decimals) - for token transfer operations */ export declare const INTEGER_AMOUNT_SCHEMA: { type: "string"; pattern: string; description: string; }; /** * URL schema - used for social URLs and token images * * @description Generated from SDK urlSchema * @pattern ^https?:\/\/ * @format uri * @example "https://example.com", "https://twitter.com/username" * @note Must start with http:// or https:// */ export declare const URL_SCHEMA: Record<string, unknown>; /** * Profile name schema * * @description Generated from SDK fullNameSchema * @pattern ^[a-zA-Z\s]+$ * @minLength 1 * @maxLength 100 * @example "John Doe", "Alice Smith" * @note Only letters and spaces allowed */ export declare const FULL_NAME_SCHEMA: Record<string, unknown>; /** * Search query schema - used in user tools * * @description Generated from SDK searchQuerySchema * @minLength 1 * @maxLength 100 * @example "dragon", "test", "my token" * @note Fuzzy match - case-insensitive, partial matching */ export declare const SEARCH_SCHEMA: Record<string, unknown>; /** * Transaction ID schema - used for getBundlerTransactionResult * * @description Generated from SDK transactionIdSchema * @pattern ^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$ * @format uuid * @example "550e8400-e29b-41d4-a716-446655440000" * @note UUID v4 format - returned from buy(), sell(), launchToken() */ export declare const TRANSACTION_ID_SCHEMA: Record<string, unknown>; /** * Idempotency key schema - used in transfer tools * * @description Generated from SDK uniqueKeySchema * @pattern ^galaconnect-operation-[a-z0-9-]+$ * @example "galaconnect-operation-abc123-def456" * @note Prevents duplicate transactions - optional but recommended */ export declare const UNIQUE_KEY_SCHEMA: Record<string, unknown>; /** * Date-time schema - used in trade and volume queries * * @description Generated from SDK isoDateStringSchema * @format date-time * @example "2024-01-15T14:30:25", "2024-01-15T14:30:25Z" * @note ISO 8601 format */ export declare const DATE_TIME_SCHEMA: Record<string, unknown>; /** * Page number schema - used in ~15 tools * * @description Generated from SDK pageNumberSchema * @type number * @minimum 1 * @maximum 1000 * @example 1, 2, 50 * @note Default: 1 (first page) */ export declare const PAGE_SCHEMA: Record<string, unknown>; /** * Creates a limit schema with operation-specific maximum * Uses SDK Zod schemas and converts to JSON Schema * * @param operationType - The type of operation (trade, user, pool, priceHistory) * @param defaultLimit - Default limit value (typically 20) * @returns Limit schema with appropriate maximum */ export declare function createLimitSchema(operationType: 'trade' | 'user' | 'pool' | 'priceHistory', defaultLimit?: number): { type: 'number'; minimum: number; maximum: number; description: string; }; /** * Slippage tolerance factor schema * * @description Manual schema (not from SDK primitives) * @type number * @minimum 0 * @maximum 1 * @example 0.01 (1%), 0.05 (5%), 0.1 (10%) * @note Decimal format - protects against price movements during transaction */ export declare const SLIPPAGE_TOLERANCE_SCHEMA: { type: "number"; minimum: number; maximum: number; description: string; }; /** * Reverse bonding curve fee slippage schema * * @description Manual schema (not from SDK primitives) * @type number * @minimum 0 * @maximum 1 * @example 0.01 (1% - default), 0.02 (2%), 0.05 (5%) * @note Applied to maxAcceptableReverseBondingCurveFee for additional protection */ export declare const RBC_FEE_SLIPPAGE_SCHEMA: { type: "number"; minimum: number; maximum: number; description: string; }; /** * Sort order schema * * @description Manual schema (not from SDK primitives) * @type string * @enum ['ASC', 'DESC'] * @example "ASC" (oldest first), "DESC" (newest first - default) * @note Default: DESC (descending, newest first) */ export declare const SORT_ORDER_SCHEMA: { type: "string"; enum: string[]; description: string; }; /** * Calculation mode schema - for calculateAmountMode parameter * * @description Manual schema (not from SDK primitives) * @type string * @enum ['local', 'external'] * @example "local" (instant client-side), "external" (network-based GalaChain) * @note Default: SDK's calculateAmountMode setting * @note Local mode: <1ms, 99.99% accurate | External mode: ~200ms, 100% accurate */ export declare const CALCULATION_MODE_SCHEMA: { type: "string"; enum: string[]; description: string; }; /** * Current supply schema - for performance optimization * * @description Extends DECIMAL_AMOUNT_SCHEMA * @pattern ^\d+(\.\d+)?$ * @example "1000000", "5000000.5" * @note Performance optimization: provide to avoid fetching pool details twice * @note Only used in local calculation mode - auto-fetched if missing */ export declare const CURRENT_SUPPLY_SCHEMA: { description: string; }; /** * Token class key schema - for fetchTokenClassesWithSupply * * Identifies a specific token class on the blockchain via four-part identifier. * Used to query supply data, fetch token details, and perform token-specific operations. * * @description Composite schema for TokenClassKey array items * @type object * @properties * - collection: Token collection identifier (e.g., "Token", "GALA") * - category: Token category (e.g., "Unit") * - type: Token type/symbol (e.g., "GALA", "GUSDC") * - additionalKey: Network or chain identifier (e.g., "none", "eth:0x...") * * @see GalaChain TokenClassKey specification for authoritative definition */ export declare const TOKEN_CLASS_KEY_SCHEMA: { type: "object"; properties: { collection: { type: "string"; description: string; minLength: number; }; category: { type: "string"; description: string; minLength: number; }; type: { type: "string"; description: string; minLength: number; }; additionalKey: { type: "string"; description: string; minLength: number; }; }; required: string[]; }; //# sourceMappingURL=common-schemas.d.ts.map