Skip to main content
Glama

network_get_network

Retrieve the current network details for the MCP Crypto Wallet EVM, providing essential blockchain information for wallet management and transactions.

Instructions

Get the current network information

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The main handler function for 'network_get_network'. It retrieves the current provider and calls provider.getNetwork() to fetch network details like name, chain ID, and ENS address, formatting the response.
    export const getNetworkHandler = async (input: any): Promise<ToolResultSchema> => { try { const provider = getProvider(); if (!provider) { return createErrorResponse("Provider is required to get network information, please set the provider URL"); } const network = await provider.getNetwork(); return createSuccessResponse(`Network information retrieved successfully Network name: ${network.name} Chain ID: ${network.chainId} ENS address: ${network.ensAddress} `); } catch (error) { return createErrorResponse(`Failed to get network information: ${(error as Error).message}`); } };
  • The tool schema definition in the tools array, specifying name, description, and empty input schema (no parameters required).
    { name: "network_get_network", description: "Get the current network information", inputSchema: { type: "object", properties: {}, required: [] } },
  • src/tools.ts:602-602 (registration)
    Registration of the tool handler in the handlers dictionary, mapping 'network_get_network' to getNetworkHandler.
    "network_get_network": getNetworkHandler,

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/dcSpark/mcp-cryptowallet-evm'

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