Skip to main content
Glama

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
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • 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)}` }] }; } } );
  • 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)}` }] }; } }
  • Calls registerCoreTools which includes the getSupportedNetworks tool registration.
    registerCoreTools(server, ethersService);

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/crazyrabbitLTC/mcp-ethers-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server