Skip to main content
Glama
clumsynonono

Aave Liquidation MCP Server

by clumsynonono

validate_address

Verify Ethereum address format for Aave V3 protocol interactions to ensure accurate transaction processing and data queries.

Instructions

Validate if a string is a valid Ethereum address format.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
addressYesAddress string to validate

Implementation Reference

  • src/index.ts:147-161 (registration)
    Tool registration in the listTools response, including name, description, and input schema definition.
    {
      name: 'validate_address',
      description:
        'Validate if a string is a valid Ethereum address format.',
      inputSchema: {
        type: 'object',
        properties: {
          address: {
            type: 'string',
            description: 'Address string to validate',
          },
        },
        required: ['address'],
      },
    },
  • The main tool handler in the CallToolRequestSchema switch statement. Validates input, calls the helper method, and formats the response.
    case 'validate_address': {
      const address = args?.address as string;
      if (!address || typeof address !== 'string') {
        throw new McpError(
          ErrorCode.InvalidParams,
          'address parameter is required and must be a string'
        );
      }
    
      const isValid = aaveClient.isValidAddress(address);
    
      return {
        content: [
          {
            type: 'text',
            text: JSON.stringify(
              {
                address,
                isValid,
                message: isValid
                  ? 'Valid Ethereum address format'
                  : 'Invalid Ethereum address format',
              },
              null,
              2
            ),
          },
        ],
      };
    }
  • Core helper method that performs the actual Ethereum address validation using ethers.js utility.
    isValidAddress(address: string): boolean {
      return ethers.isAddress(address);
    }

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/clumsynonono/aave-liquidation-mcp'

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