Skip to main content
Glama

get_wallet_address_from_private_key

Retrieve a wallet address from a private key with checksum formatting, enabling secure interaction with EDUCHAIN's token and pool data.

Instructions

Get wallet address from private key with proper checksum formatting

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
privateKeyYesPrivate key of the wallet

Implementation Reference

  • Core handler function that creates an ethers.Wallet from the provided private key and returns the checksummed wallet address.
    export function getWalletAddressFromPrivateKey(privateKey: string): string {
      try {
        const wallet = new ethers.Wallet(privateKey);
        return ethers.getAddress(wallet.address); // Format to checksum address
      } catch (error) {
        console.error('Error getting wallet address from private key:', error);
        throw error;
      }
    }
  • Input schema definition for the 'get_wallet_address_from_private_key' tool, listed in the ListTools response.
    {
      name: 'get_wallet_address_from_private_key',
      description: 'Get wallet address from private key with proper checksum formatting',
      inputSchema: {
        type: 'object',
        properties: {
          privateKey: {
            type: 'string',
            description: 'Private key of the wallet',
          },
        },
        required: ['privateKey'],
      },
    },
  • src/index.ts:1000-1015 (registration)
    MCP tool registration and dispatch handler in the CallToolRequestSchema switch statement. Validates input and delegates to the blockchain module handler.
    case 'get_wallet_address_from_private_key': {
      if (!args.privateKey || typeof args.privateKey !== 'string') {
        throw new McpError(ErrorCode.InvalidParams, 'Private key is required');
      }
      
      const walletAddress = blockchain.getWalletAddressFromPrivateKey(args.privateKey);
      
      return {
        content: [
          {
            type: 'text',
            text: JSON.stringify({ walletAddress }, null, 2),
          },
        ],
      };
    }
Behavior2/5

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

No annotations are provided, so the description carries full burden. It mentions 'proper checksum formatting,' which adds some behavioral context about output formatting. However, it lacks details on security implications (e.g., private key handling), error conditions, or response format. For a tool handling sensitive data with zero annotation coverage, this is a significant gap.

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 a single, efficient sentence with zero waste. It's front-loaded with the core purpose and includes a key detail ('proper checksum formatting') that earns its place. No unnecessary words or redundancy.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's moderate complexity (handles sensitive private key data), no annotations, and no output schema, the description is minimally adequate. It covers the transformation purpose and output formatting but lacks details on security, errors, or return values. It meets basic needs but has clear gaps for safe agent use.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, with the parameter 'privateKey' documented as 'Private key of the wallet.' The description adds no additional parameter semantics beyond what the schema provides, such as format requirements (e.g., hex string) or validation rules. Baseline 3 is appropriate since the schema does the heavy lifting.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose: 'Get wallet address from private key with proper checksum formatting.' It specifies the verb ('Get'), resource ('wallet address'), and key transformation ('from private key'), though it doesn't explicitly differentiate from siblings like 'get_wallet_overview' which might provide broader wallet information. The purpose is specific but lacks sibling distinction.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention prerequisites (e.g., needing a private key), exclusions (e.g., not for public keys), or compare to siblings like 'get_wallet_overview' for broader data. Usage is implied from the purpose but not explicitly stated.

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

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/SailFish-Finance/educhain-ai-agent-kit'

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