Skip to main content
Glama
edkdev

DeFi Trading Agent MCP Server

by edkdev

get_trending_pools

Retrieve trending liquidity pools from GeckoTerminal across multiple networks to identify trading opportunities in DeFi markets.

Instructions

Get trending pools across all networks on GeckoTerminal

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
includeNoAttributes to include: 'base_token', 'quote_token', 'dex', 'network' (comma-separated)
pageNoPage number for pagination (optional, default: 1)
durationNoDuration for trending: '5m', '1h', '6h', '24h' (optional, default: '24h')

Implementation Reference

  • The primary handler function for the 'get_trending_pools' tool. It calls the CoinGecko API service to fetch trending pools data across all networks and formats the response with a message, data, summary, and duration.
    async getTrendingPools(options = {}) {
      const result = await this.coinGeckoApi.getTrendingPools(options);
    
      return {
        message: "Trending pools retrieved successfully",
        data: result,
        summary: `Found ${result.data?.length || 0} trending pools`,
        duration: options.duration || "24h",
      };
    }
  • The input schema definition for the 'get_trending_pools' tool, specifying optional parameters like include, page, and duration.
    name: TOOL_NAMES.GET_TRENDING_POOLS,
    description: "Get trending pools across all networks on GeckoTerminal",
    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)",
        },
        duration: {
          type: "string",
          description:
            "Duration for trending: '5m', '1h', '6h', '24h' (optional, default: '24h')",
          enum: ["5m", "1h", "6h", "24h"],
        },
      },
      required: [],
    },
  • src/index.js:1022-1028 (registration)
    The tool registration and dispatching logic in the MCP CallToolRequestSchema handler switch statement, which routes calls to the toolService.getTrendingPools method.
    case TOOL_NAMES.GET_TRENDING_POOLS:
      result = await toolService.getTrendingPools({
        include: args.include,
        page: args.page,
        duration: args.duration,
      });
      break;
  • Constant definition mapping the tool name 'get_trending_pools' used throughout the codebase for registration and dispatching.
    GET_TRENDING_POOLS: "get_trending_pools",
  • Supporting utility method in CoinGeckoApiService that performs the actual HTTP fetch to the CoinGecko API endpoint for trending pools.
    async getTrendingPools(options = {}) {
      try {
        const queryParams = new URLSearchParams();
        
        if (options.include) queryParams.append('include', options.include);
        if (options.page) queryParams.append('page', options.page);
        if (options.duration) queryParams.append('duration', options.duration);
    
        const url = `${this.baseUrl}/networks/trending_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 trending pools: ${error.message}`);
      }
    }
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden of behavioral disclosure. While 'Get' implies a read operation, it doesn't specify whether this is a real-time query, cached data, rate-limited, or what the response format looks like. For a tool with no annotation coverage, this leaves critical behavioral traits undocumented.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence with zero waste. It's appropriately sized and front-loaded, directly stating the tool's purpose without unnecessary elaboration.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's complexity (fetching trending data across networks with parameters), no annotations, and no output schema, the description is incomplete. It lacks behavioral context, usage differentiation from siblings, and details on return values, making it inadequate for informed tool selection.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema already documents all three parameters thoroughly. The description adds no additional parameter semantics beyond what's in the schema. Baseline 3 is appropriate when the schema does the heavy lifting, though no extra value is added.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb 'Get' and resource 'trending pools across all networks on GeckoTerminal', providing a specific purpose. However, it doesn't explicitly distinguish from its sibling 'get_trending_pools_by_network', which appears to be a more specific version, leaving some ambiguity about when to use one versus the other.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. With a sibling tool 'get_trending_pools_by_network' that likely serves a similar purpose but with network filtering, the lack of differentiation is a significant gap. No context, exclusions, or prerequisites are mentioned.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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