Skip to main content
Glama

checkWalletExists

Verify if an Ethereum wallet exists on a specified network by checking its address availability and connection status.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
providerNoOptional. Either a network name or custom RPC URL. Use getAllNetworks to see available networks and their details, or getNetwork to get info about a specific network. You can use any network name returned by these tools as a provider value.

Implementation Reference

  • Registration of the 'checkWalletExists' MCP tool, including input schema (optional provider) and handler function that retrieves wallet information via ethersService.getWalletInfo(provider) and returns it as JSON or error response.
    // Check if wallet exists
    server.tool(
      "checkWalletExists",
      {
        provider: z.string().optional().describe(PROVIDER_DESCRIPTION)
      },
      async ({ provider }) => {
        try {
          const walletInfo = await ethersService.getWalletInfo(provider);
          return {
            content: [{ 
              type: "text", 
              text: JSON.stringify(walletInfo, null, 2)
            }]
          };
        } catch (error) {
          return {
            isError: true,
            content: [{ 
              type: "text", 
              text: `Error checking wallet: ${error instanceof Error ? error.message : String(error)}`
            }]
          };
        }
      }
    );

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/crazyrabbitLTC/mcp-ethers-server'

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