Skip to main content
Glama
edkdev

DeFi Trading Agent MCP Server

by edkdev

get_gasless_chains

Find blockchain networks that support gasless swaps to enable trading without paying transaction fees.

Instructions

Get list of blockchain networks that support gasless swaps

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Primary handler function for the 'get_gasless_chains' tool. Delegates to AgService and formats the response for MCP protocol.
    async getGaslessChains() {
      const result = await this.agg.getGaslessChains();
    
      return {
        message: "Gasless supported chains retrieved successfully",
        data: result,
        summary: `Found ${
          result.chains?.length || 0
        } chains supporting gasless swaps`,
        note: "These chains support meta-transaction based gasless swaps",
      };
    }
  • Core utility function in AgService that performs the HTTP request to retrieve gasless-supported chains from the aggregator backend.
    async getGaslessChains() {
      try {
        const response = await fetch(`${this.baseUrl}/api/swap/gasless/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 || 'Gasless chains request failed');
        }
        
        return data.data;
      } catch (error) {
        throw new Error(`Failed to get gasless chains: ${error.message}`);
      }
    }
  • Tool schema definition including name, description, and empty input schema (no parameters required).
    {
      name: TOOL_NAMES.GET_GASLESS_CHAINS,
      description:
        "Get list of blockchain networks that support gasless swaps",
      inputSchema: {
        type: "object",
        properties: {},
        required: [],
      },
    },
  • src/index.js:1154-1156 (registration)
    Registration in the tool dispatch switch statement that routes calls to ToolService.getGaslessChains()
    case TOOL_NAMES.GET_GASLESS_CHAINS:
      result = await toolService.getGaslessChains();
      break;
  • Constant definition for the tool name used throughout the codebase.
    GET_GASLESS_CHAINS: "get_gasless_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. It implies a read-only operation ('Get list') but doesn't disclose behavioral traits such as rate limits, authentication needs, data freshness, or error handling. This is a significant gap for a tool with zero annotation coverage.

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, with zero waste.

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 tool's simplicity (0 parameters, no output schema, no annotations), the description is minimally adequate but lacks depth. It doesn't explain return values (e.g., format of the list) or behavioral context, which is a gap since no output schema exists to compensate.

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 tool has 0 parameters, and schema description coverage is 100%, so no parameter information is needed. The description doesn't add param details, but this is acceptable given the absence of parameters, warranting a baseline score of 4.

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 that support gasless swaps', making the purpose specific and understandable. It distinguishes from siblings like 'get_supported_chains' by specifying 'gasless swaps', though it doesn't explicitly contrast them.

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 like 'get_supported_chains' or other gasless-related tools (e.g., 'get_gasless_approval_tokens'). It lacks context on prerequisites, timing, or exclusions, leaving usage unclear.

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