@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
58 lines • 2.15 kB
JavaScript
;
/**
* Fetch DEX Pools Tool
*
* Queries the GalaSwap DEX backend for available liquidity pools with pagination,
* sorting, and search filtering capabilities.
*/
Object.defineProperty(exports, "__esModule", { value: true });
exports.fetchDexPoolsTool = void 0;
const response_formatter_js_1 = require("../../utils/response-formatter.js");
const error_handler_js_1 = require("../../utils/error-handler.js");
exports.fetchDexPoolsTool = {
name: 'gala_launchpad_fetch_dex_pools',
description: 'Fetch DEX pools with pagination and filtering - query available liquidity pools on GalaSwap',
inputSchema: {
type: 'object',
properties: {
search: {
type: 'string',
minLength: 1,
maxLength: 100,
description: 'Search filter for token symbols in pool pair (e.g., "GALA", "GUSDC", "GALA/GUSDC")',
},
sortBy: {
type: 'string',
enum: ['tvl', 'volume30d', 'volume1d'],
description: 'Field to sort results by (default: tvl)',
},
sortOrder: {
type: 'string',
enum: ['asc', 'desc'],
description: 'Sort order direction (default: desc)',
},
page: {
type: 'number',
minimum: 1,
description: 'Page number (1-based pagination, default: 1)',
},
limit: {
type: 'number',
minimum: 1,
maximum: 20,
description: 'Number of results per page (default: 10, maximum: 20)',
},
},
},
handler: (0, error_handler_js_1.withErrorHandling)(async (sdk, args) => {
const result = await sdk.fetchDexPools({
search: args.search,
sortBy: args.sortBy || 'tvl',
sortOrder: args.sortOrder || 'desc',
page: args.page || 1,
limit: args.limit || 10,
});
return (0, response_formatter_js_1.formatSuccess)(result);
}),
};
//# sourceMappingURL=fetchDexPools.js.map