getSupportedNetworks
Retrieve a list of supported Ethereum networks and their configurations to identify available blockchain options for wallet and smart contract interactions.
Instructions
Get a list of all supported networks and their configurations. For more detailed information about networks, use the getAllNetworks and getNetwork tools.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/tools/core.ts:27-49 (registration)The registration and inline handler function for the 'getSupportedNetworks' tool. It calls ethersService.getSupportedNetworks() and returns the networks as formatted JSON text, with error handling."getSupportedNetworks", "Get a list of all supported networks and their configurations. For more detailed information about networks, use the getAllNetworks and getNetwork tools.", {}, async () => { try { const networks = await ethersService.getSupportedNetworks(); return { content: [{ type: "text", text: JSON.stringify(networks, null, 2) }] }; } catch (error) { return { isError: true, content: [{ type: "text", text: `Error getting supported networks: ${error instanceof Error ? error.message : String(error)}` }] }; } } );
- src/tools/core.ts:31-48 (handler)The core handler logic that executes the tool: fetches supported networks from ethersService and formats the response.try { const networks = await ethersService.getSupportedNetworks(); return { content: [{ type: "text", text: JSON.stringify(networks, null, 2) }] }; } catch (error) { return { isError: true, content: [{ type: "text", text: `Error getting supported networks: ${error instanceof Error ? error.message : String(error)}` }] }; } }
- src/tools/index.ts:23-23 (registration)Calls registerCoreTools which includes the getSupportedNetworks tool registration.registerCoreTools(server, ethersService);