Skip to main content
Glama

get_supported_networks

Retrieve available EVM blockchain networks to identify compatible chains for ENS resolution, token operations, and smart contract interactions.

Instructions

Get a list of all supported EVM networks

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Registration of the 'get_supported_networks' tool, including empty input schema and inline async handler that calls getSupportedNetworks() to retrieve and return the list of supported networks.
    server.tool(
      'get_supported_networks',
      'Get a list of supported EVM networks',
      {},
      async () => {
        try {
          const networks = getSupportedNetworks();
    
          return {
            content: [
              {
                type: 'text',
                text: JSON.stringify(
                  {
                    supportedNetworks: networks
                  },
                  null,
                  2
                )
              }
            ]
          };
        } catch (error) {
          return {
            content: [
              {
                type: 'text',
                text: `Error fetching supported networks: ${error instanceof Error ? error.message : String(error)}`
              }
            ],
            isError: true
          };
        }
      }
    );
  • Helper function that generates the list of supported networks by extracting keys from networkNameMap, filtering out short aliases (length <=2), and sorting alphabetically.
    export function getSupportedNetworks(): string[] {
      return Object.keys(networkNameMap)
        .filter((name) => name.length > 2) // Filter out short aliases
        .sort();
    }
  • Calls registerEVMTools which includes the registration of get_supported_networks among other tools.
    registerEVMTools(server);
    registerEVMPrompts(server);
  • Usage of getSupportedNetworks() in the supported_networks resource handler (not the tool).
    const networks = getSupportedNetworks();
  • Empty Zod schema indicating the tool takes no input parameters.
    {},

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/chulanpro5/evm-mcp-server'

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