Skip to main content
Glama

getAllNetworks

Retrieve details for all blockchain networks including names, chain IDs, and RPC URLs to configure Ethereum tools and specify network parameters.

Instructions

Get information about all available blockchain networks. Use this to identify network names, chain IDs, and RPC URLs that can be used with other Ethereum tools. When using other tools with a 'provider' parameter, you can specify any of these network names.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Registers the 'getAllNetworks' MCP tool with the server. Includes tool name, description, empty input schema ({}), and the complete inline handler function that formats and returns a JSON list of all supported networks' details (name, chainId, nativeToken, rpcUrl, explorer).
    server.tool(
      "getAllNetworks",
      "Get information about all available blockchain networks. Use this to identify network names, chain IDs, and RPC URLs that can be used with other Ethereum tools. When using other tools with a 'provider' parameter, you can specify any of these network names.",
      {},
      async () => {
        // Format network data into a user-friendly format
        const networks = DEFAULT_PROVIDERS
          .filter(networkName => networkName in networkList)
          .map(networkName => {
            const networkInfo = networkList[networkName as NetworkName];
            return {
              name: networkName,
              chainId: networkInfo.chainId,
              nativeToken: networkInfo.currency,
              rpcUrl: networkInfo.RPC,
              explorer: networkInfo.explorer || ''
            };
          });
        
        return {
          content: [{
            type: "text",
            text: JSON.stringify(networks, null, 2)
          }]
        };
      }
    );
  • The core handler function for the getAllNetworks tool. It filters DEFAULT_PROVIDERS using networkList availability, maps to a user-friendly format, and returns the networks list as formatted JSON text in MCP response format.
      async () => {
        // Format network data into a user-friendly format
        const networks = DEFAULT_PROVIDERS
          .filter(networkName => networkName in networkList)
          .map(networkName => {
            const networkInfo = networkList[networkName as NetworkName];
            return {
              name: networkName,
              chainId: networkInfo.chainId,
              nativeToken: networkInfo.currency,
              rpcUrl: networkInfo.RPC,
              explorer: networkInfo.explorer || ''
            };
          });
        
        return {
          content: [{
            type: "text",
            text: JSON.stringify(networks, null, 2)
          }]
        };
      }
    );
  • Top-level registration call within registerAllTools that invokes the networkTools registration function, thereby registering getAllNetworks among other tools.
    registerNetworkTools(server);
  • Input schema for getAllNetworks tool: empty object indicating no parameters required.
    {},
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries full burden. It describes what the tool returns (network information) and its purpose (identification for other tools), but doesn't disclose behavioral traits like whether this is a cached list, real-time network discovery, rate limits, authentication requirements, or error conditions. The description is accurate but lacks operational details.

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 efficiently structured in two sentences: the first states the core purpose and output, the second provides explicit usage guidance. Every word adds value with no redundancy or unnecessary elaboration.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a zero-parameter tool with no annotations and no output schema, the description provides good context about what information is returned and how to use it. However, it doesn't describe the format or structure of the returned network information (e.g., array of objects with specific fields), which would be helpful given the lack of output schema.

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 with 100% schema description coverage. The description appropriately doesn't discuss parameters since none exist, and instead focuses on the tool's purpose and output. This meets the baseline of 4 for zero-parameter tools.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the specific action ('Get information about all available blockchain networks') and identifies the resources returned ('network names, chain IDs, and RPC URLs'). It distinguishes this tool from sibling tools like 'getNetwork' (singular) by emphasizing it retrieves information about ALL networks, not just one.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description explicitly states when to use this tool ('Use this to identify network names... that can be used with other Ethereum tools') and provides a specific usage context ('When using other tools with a 'provider' parameter, you can specify any of these network names'). It clearly differentiates this from tools that perform operations on specific networks.

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

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