Skip to main content
Glama
edkdev

DeFi Trading Agent MCP Server

by edkdev

get_coingecko_networks

Retrieve supported blockchain networks from CoinGecko/GeckoTerminal for crypto trading analysis and portfolio management across multiple chains.

Instructions

Get list of supported networks on CoinGecko/GeckoTerminal

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pageNoPage number for pagination (optional, default: 1)

Implementation Reference

  • Main handler function that executes the tool logic by calling the CoinGecko API service's getNetworks method and wrapping the response with standardized message, data, and summary.
    async getCoinGeckoNetworks(page = 1) {
      const result = await this.coinGeckoApi.getNetworks(page);
    
      return {
        message: "CoinGecko networks retrieved successfully",
        data: result,
        summary: `Found ${result.data?.length || 0} networks on page ${page}`,
      };
    }
  • MCP tool schema defining the input parameters (page optional integer) and description for get_coingecko_networks.
      name: TOOL_NAMES.GET_COINGECKO_NETWORKS,
      description:
        "Get list of supported networks on CoinGecko/GeckoTerminal",
      inputSchema: {
        type: "object",
        properties: {
          page: {
            type: "integer",
            description: "Page number for pagination (optional, default: 1)",
          },
        },
        required: [],
      },
    },
  • src/index.js:1014-1016 (registration)
    MCP server request handler switch case that registers and dispatches calls to the tool handler.
    case TOOL_NAMES.GET_COINGECKO_NETWORKS:
      result = await toolService.getCoinGeckoNetworks(args.page);
      break;
  • Supporting utility in CoinGeckoApiService that makes the actual HTTP request to the CoinGecko /onchain/networks endpoint with pagination.
    async getNetworks(page = 1) {
      try {
        const queryParams = new URLSearchParams();
        if (page) queryParams.append('page', page);
    
        const url = `${this.baseUrl}/networks${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 networks: ${error.message}`);
      }
    }
  • Constant defining the tool name string used throughout the codebase.
    GET_COINGECKO_NETWORKS: "get_coingecko_networks",
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. It states the action but lacks details on permissions, rate limits, pagination behavior beyond the schema, or what the output looks like. For a read operation with no annotation coverage, this is a significant gap in transparency.

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 that directly states the tool's purpose without unnecessary words. It is appropriately sized and front-loaded, making it easy for an agent to parse quickly.

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

Completeness3/5

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

Given the low complexity (one optional parameter) and high schema coverage, the description is minimally adequate. However, with no output schema and no annotations, it lacks details on return values or behavioral traits, leaving gaps that could hinder effective tool invocation.

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%, with the single parameter 'page' documented in the schema. The description adds no additional parameter semantics beyond what the schema provides, such as default values or usage context, so it meets the baseline for high schema coverage without compensating value.

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 list' and the resource 'supported networks on CoinGecko/GeckoTerminal', making the purpose unambiguous. However, it doesn't explicitly differentiate from sibling tools like 'get_supported_chains' or 'get_gasless_chains', which might have overlapping or related functionality, preventing a perfect score.

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. Given sibling tools like 'get_supported_chains' and 'get_gasless_chains', there's no indication of differences in scope, source, or use cases, leaving the agent without direction on tool selection.

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