Skip to main content
Glama

network_info

Retrieve current Hedera network configuration including network name, Mirror Node URL, and JSON-RPC Relay endpoint to verify active network status and access required endpoints.

Instructions

Get current Hedera network configuration.

RETURNS: Network name, Mirror Node URL, JSON-RPC Relay endpoint USE FOR: Verifying active network, getting endpoint URLs, network status.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The main handler function that executes the 'network current' Hedera CLI command to retrieve information about the currently active Hedera network.
    export async function getCurrentNetwork(): Promise<ToolResult> {
      try {
        logger.info('Getting current network info');
    
        const result = await hederaCLI.executeCommand({
          command: 'network current',
          args: {},
        });
    
        return result;
      } catch (error) {
        logger.error('Failed to get current network', { error });
        return {
          success: false,
          error: error instanceof Error ? error.message : 'Unknown error',
        };
      }
    }
  • Defines the tool name, description, and input schema (empty object) for the network_info tool in the optimizedToolDefinitions array.
      {
        name: 'network_info',
        description: `Get current Hedera network configuration.
    
    RETURNS: Network name, Mirror Node URL, JSON-RPC Relay endpoint
    USE FOR: Verifying active network, getting endpoint URLs, network status.`,
        inputSchema: {
          type: 'object' as const,
          properties: {},
        },
      },
  • src/index.ts:580-582 (registration)
    Registers the getCurrentNetwork handler function for execution when the 'network_info' tool is called in the main tool dispatcher switch statement.
    case 'network_info':
      result = await getCurrentNetwork();
      break;

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/justmert/hashpilot'

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