Skip to main content
Glama
edkdev

DeFi Trading Agent MCP Server

by edkdev

get_new_pools

Retrieve newly created liquidity pools across multiple blockchain networks to identify emerging trading opportunities in decentralized finance.

Instructions

Get latest new pools across all networks

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
includeNoAttributes to include: 'base_token', 'quote_token', 'dex', 'network' (comma-separated)
pageNoPage number for pagination (optional, default: 1)

Implementation Reference

  • Defines the input schema, description, and metadata for the 'get_new_pools' MCP tool in the tools list returned by ListToolsRequestHandler.
    { name: TOOL_NAMES.GET_NEW_POOLS, description: "Get latest new pools across all networks", inputSchema: { type: "object", properties: { include: { type: "string", description: "Attributes to include: 'base_token', 'quote_token', 'dex', 'network' (comma-separated)", }, page: { type: "integer", description: "Page number for pagination (optional, default: 1)", }, }, required: [], }, },
  • src/index.js:1057-1062 (registration)
    Registers the 'get_new_pools' tool handler dispatch in the CallToolRequestHandler switch statement, mapping tool calls to toolService.getNewPools().
    case TOOL_NAMES.GET_NEW_POOLS: result = await toolService.getNewPools({ include: args.include, page: args.page, }); break;
  • The primary handler function for the 'get_new_pools' tool. Delegates to CoinGeckoApiService, formats the response with message, data, and summary.
    async getNewPools(options = {}) { const result = await this.coinGeckoApi.getNewPools(options); return { message: "New pools retrieved successfully", data: result, summary: `Found ${ result.data?.length || 0 } new pools across all networks`, }; }
  • Core helper function that performs the HTTP request to CoinGecko's /networks/new_pools endpoint to fetch new pools data.
    async getNewPools(options = {}) { try { const queryParams = new URLSearchParams(); if (options.include) queryParams.append('include', options.include); if (options.page) queryParams.append('page', options.page); const url = `${this.baseUrl}/networks/new_pools${queryParams.toString() ? '?' + queryParams.toString() : ''}`; const response = await fetch(url, { headers: { 'x-cg-demo-api-key': this.apiKey } }); if (!response.ok) { throw new Error(`HTTP ${response.status}: ${response.statusText}`); } return await response.json(); } catch (error) { throw new Error(`Failed to get new pools: ${error.message}`); } }
  • Constant definition for the tool name 'get_new_pools' used throughout the codebase.
    GET_NEW_POOLS: "get_new_pools",

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/edkdev/defi-trading-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server