Skip to main content
Glama

get_network_mode

Retrieve the current network mode from the Neo N3 MCP Server to determine its operational environment for blockchain interactions, wallet management, and smart contract execution.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Primary implementation of the 'get_network_mode' tool using the modern McpServer.tool API. Computes and returns the current network mode, available networks, and default network as structured JSON text content.
    this.server.tool( 'get_network_mode', {}, async () => { const availableNetworks = []; if (config.networkMode === NetworkMode.MAINNET_ONLY || config.networkMode === NetworkMode.BOTH) { availableNetworks.push(NeoNetwork.MAINNET); } if (config.networkMode === NetworkMode.TESTNET_ONLY || config.networkMode === NetworkMode.BOTH) { availableNetworks.push(NeoNetwork.TESTNET); } const result = { mode: config.networkMode, availableNetworks, defaultNetwork: config.networkMode === NetworkMode.TESTNET_ONLY ? NeoNetwork.TESTNET : NeoNetwork.MAINNET }; return { content: [ { type: 'text', text: JSON.stringify(result, null, 2), }, ], }; } );
  • Input schema for 'get_network_mode' tool: empty object (no parameters required).
    {},
  • Alternative handler function 'handleGetNetworkMode' returning just the networkMode from config (possibly for low-level MCP handler setup, unused in main server).
    async function handleGetNetworkMode(): Promise<any> { return createSuccessResponse({ networkMode: config.networkMode }); }
  • Switch case registration dispatching to handleGetNetworkMode in callTool router (low-level implementation, unused in main server).
    case 'get_network_mode': return await handleGetNetworkMode();
  • Tool schema definition in tools array for low-level setupToolHandlers (unused in main server).
    name: 'get_network_mode', description: 'Get the currently configured network mode (mainnet_only, testnet_only, both)', inputSchema: { type: 'object', properties: {} },

Other Tools

Related 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/r3e-network/neo-n3-mcp'

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