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;
Behavior4/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It effectively describes the tool's behavior by specifying what it returns (network name, Mirror Node URL, JSON-RPC Relay endpoint) and its use cases. However, it lacks details on potential errors, latency, or data freshness, which could be useful for an agent.

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 highly structured with clear sections ('RETURNS', 'USE FOR'), front-loaded with the core purpose, and uses only three concise sentences. Every sentence adds value without repetition or fluff, making it efficient for an agent to parse.

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?

Given the tool's simplicity (0 parameters, no output schema, no annotations), the description is nearly complete. It covers purpose, returns, and usage guidelines. A minor gap is the lack of output format details (e.g., structure of returned data), but for a straightforward info tool, this is acceptable.

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 input schema has 0 parameters with 100% coverage, so no parameter documentation is needed. The description appropriately omits parameter details, focusing instead on the tool's output and usage. This meets the baseline of 4 for tools with no parameters, as it avoids redundancy.

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 verb ('Get') and resource ('current Hedera network configuration'), making the purpose specific and unambiguous. It distinguishes itself from siblings like 'network_switch' (which changes networks) by focusing on retrieval of configuration data, not modification.

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 'USE FOR' section explicitly lists three scenarios: verifying active network, getting endpoint URLs, and checking network status. This provides clear, actionable guidance on when to use this tool, distinguishing it from alternatives like 'health_check' (which might test connectivity) or 'rpc_call' (which uses endpoints).

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

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