Skip to main content
Glama
edkdev

DeFi Trading Agent MCP Server

by edkdev

get_supported_chains

Retrieve available blockchain networks for decentralized finance trading operations, enabling AI agents to identify compatible platforms for market analysis and transaction execution.

Instructions

Get list of blockchain networks supported by Aggregator Protocol

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The main handler function for the get_supported_chains tool. Delegates to AgService.getSupportedChains() and formats the response with message, data, and summary.
    async getSupportedChains() {
      const result = await this.agg.getSupportedChains();
    
      return {
        message: "Supported chains retrieved successfully",
        data: result,
        summary: `Found ${result.chains?.length || 0} supported chains`,
      };
    }
  • Tool schema definition in the ListToolsRequestHandler, including name, description, and input schema (no parameters required).
    name: TOOL_NAMES.GET_SUPPORTED_CHAINS,
    description:
      "Get list of blockchain networks supported by Aggregator Protocol",
    inputSchema: {
      type: "object",
      properties: {},
      required: [],
    },
  • src/index.js:996-998 (registration)
    Tool registration in the CallToolRequestHandler switch statement, dispatching calls to ToolService.getSupportedChains().
    case TOOL_NAMES.GET_SUPPORTED_CHAINS:
      result = await toolService.getSupportedChains();
      break;
  • Supporting function in AgService that performs the HTTP request to the Aggregator API (/api/swap/chains) to retrieve the list of supported chains.
    async getSupportedChains() {
      try {
        const response = await fetch(`${this.baseUrl}/api/swap/chains`);
        
        if (!response.ok) {
          throw new Error(`HTTP ${response.status}: ${response.statusText}`);
        }
        
        const data = await response.json();
        
        if (!data.success) {
          throw new Error(data.error || 'API request failed');
        }
        
        return data.data;
      } catch (error) {
        throw new Error(`Failed to get supported chains: ${error.message}`);
      }
    }
  • Constant definition for the tool name used in schema, registration, and dispatching.
    GET_SUPPORTED_CHAINS: "get_supported_chains",
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 only states the action of getting a list, without mentioning any behavioral traits such as whether it's a read-only operation, potential rate limits, authentication needs, or what the output format might be. This leaves significant gaps for an agent to understand how to interact with the tool effectively.

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 any unnecessary words. It is front-loaded and appropriately sized for a simple tool, 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.

Completeness2/5

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

Given the tool's simplicity (0 parameters, no output schema, no annotations), the description is minimal. It lacks details on behavioral aspects like output format or usage context, which are important for an agent to invoke it correctly. While it covers the basic purpose, it doesn't provide enough completeness for reliable tool selection and invocation in a broader context.

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

Parameters4/5

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

The input schema has 0 parameters with 100% coverage, meaning no parameters are documented in the schema. The description doesn't add parameter details, which is acceptable since there are no parameters to explain. This meets the baseline for tools with zero parameters, as it doesn't need to compensate for any gaps.

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 the resource 'list of blockchain networks supported by Aggregator Protocol', which specifies what the tool does. However, it doesn't distinguish itself from sibling tools like 'get_gasless_chains' or 'get_coingecko_networks', which might also retrieve blockchain-related data, leaving some ambiguity about its unique scope.

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 siblings like 'get_gasless_chains' and 'get_coingecko_networks' that might overlap in retrieving blockchain network information, there is no explicit context, exclusions, or named alternatives mentioned to help an agent choose appropriately.

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