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
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/toolService.js:567-578 (handler)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", }; }
- src/services/agService.js:206-224 (helper)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}`); } }
- src/index.js:743-752 (schema)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;
- src/constants.js:15-15 (helper)Constant definition for the tool name used throughout the codebase.GET_GASLESS_CHAINS: "get_gasless_chains",