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
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/tools/network.ts:13-30 (handler)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', }; } }
- src/index.ts:187-197 (schema)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;