@gala-chain/launchpad-mcp-server
Version:
MCP server for Gala Launchpad SDK with 55 tools + 14 slash commands - Production-grade AI agent integration with comprehensive validation, optimized performance, and 80%+ test coverage
112 lines • 3.8 kB
TypeScript
/**
* Central Constraints Reference
*
* This file documents the pagination limits enforced by the SDK for different operations.
* These constants are imported from the SDK's internal constraint definitions and serve
* as the single source of truth for MCP tool schema validation.
*
* IMPORTANT: Always keep these in sync with the SDK's actual constraints:
* - TRADE_CONSTRAINTS.PAGINATION.MAX_LIMIT (trade.dto.ts)
* - USER_CONSTRAINTS.PAGINATION.MAX_LIMIT (user.dto.ts)
* - PAGINATION_CONSTRAINTS.MAX_LIMIT (launchpad.dto.ts)
* - COMMENT_CONSTRAINTS.PAGINATION.MAX_LIMIT (comment.dto.ts)
*/
/**
* MCP Tool Constraint Constants
*
* These values MUST match the SDK's internal constraint definitions to prevent
* validation errors when AI agents use the MCP tools.
*/
export declare const MCP_CONSTRAINTS: {
/**
* Trade operations limit (fetchTrades)
* Source: TRADE_CONSTRAINTS.PAGINATION.MAX_LIMIT
* SDK File: packages/sdk/src/types/trade.dto.ts:331
*/
readonly TRADE_LIMIT: 20;
/**
* User operations limit (fetchTokensHeld, fetchTokensCreated)
* Source: USER_CONSTRAINTS.PAGINATION.MAX_LIMIT
* SDK File: packages/sdk/src/types/user.dto.ts:297
*/
readonly USER_LIMIT: 20;
/**
* General pool operations limit (fetchPools)
* Source: PAGINATION_CONSTRAINTS.MAX_LIMIT
* SDK File: packages/sdk/src/types/launchpad.dto.ts:587
*/
readonly POOL_LIMIT: 100;
/**
* Comment operations limit (fetchComments)
* Source: COMMENT_CONSTRAINTS.PAGINATION.MAX_LIMIT
* SDK File: packages/sdk/src/types/comment.dto.ts:149
*/
readonly COMMENT_LIMIT: 50;
/**
* Minimum limit for all pagination operations
*/
readonly MIN_LIMIT: 1;
/**
* Minimum page number for all pagination operations
*/
readonly MIN_PAGE: 1;
/**
* Maximum page number for all pagination operations
*/
readonly MAX_PAGE: 1000;
};
/**
* Constraint usage reference for MCP tool developers
*
* @example
* // Trading tools (fetchTrades)
* limit: {
* type: 'number',
* minimum: MCP_CONSTRAINTS.MIN_LIMIT,
* maximum: MCP_CONSTRAINTS.TRADE_LIMIT, // 20
* description: `Results per page (default: 20, maximum: ${MCP_CONSTRAINTS.TRADE_LIMIT})`
* }
*
* @example
* // Balance/User tools (fetchTokensHeld, fetchTokensCreated)
* limit: {
* type: 'number',
* minimum: MCP_CONSTRAINTS.MIN_LIMIT,
* maximum: MCP_CONSTRAINTS.USER_LIMIT, // 20
* description: `Results per page (default: 20, maximum: ${MCP_CONSTRAINTS.USER_LIMIT})`
* }
*
* @example
* // Pool tools (fetchPools)
* limit: {
* type: 'number',
* minimum: MCP_CONSTRAINTS.MIN_LIMIT,
* maximum: MCP_CONSTRAINTS.POOL_LIMIT, // 100
* description: `Results per page (default: 20, maximum: ${MCP_CONSTRAINTS.POOL_LIMIT})`
* }
*
* @example
* // Social tools (fetchComments)
* limit: {
* type: 'number',
* minimum: MCP_CONSTRAINTS.MIN_LIMIT,
* maximum: MCP_CONSTRAINTS.COMMENT_LIMIT, // 50
* description: `Results per page (default: 20, maximum: ${MCP_CONSTRAINTS.COMMENT_LIMIT})`
* }
*/
/**
* Validation helper to check if a limit value is valid for a specific operation type
*
* @param limit The limit value to validate
* @param operationType The type of operation ('trade' | 'user' | 'pool' | 'comment')
* @returns true if valid, false otherwise
*/
export declare function isValidLimit(limit: number, operationType: 'trade' | 'user' | 'pool' | 'comment'): boolean;
/**
* Get the maximum limit for a specific operation type
*
* @param operationType The type of operation
* @returns The maximum limit value
*/
export declare function getMaxLimit(operationType: 'trade' | 'user' | 'pool' | 'comment'): number;
//# sourceMappingURL=constraints.d.ts.map