Skip to main content
Glama
clumsynonono

Aave Liquidation MCP Server

by clumsynonono

get_asset_price

Retrieve current asset prices from Aave oracles to monitor collateral values, assess liquidation risks, and analyze protocol positions.

Instructions

Get current price for a specific asset from Aave oracle.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
assetAddressYesToken contract address

Implementation Reference

  • src/index.ts:105-119 (registration)
    Tool registration in the listTools handler, including name, description, and input schema definition.
    {
      name: 'get_asset_price',
      description:
        'Get current price for a specific asset from Aave oracle.',
      inputSchema: {
        type: 'object',
        properties: {
          assetAddress: {
            type: 'string',
            description: 'Token contract address',
          },
        },
        required: ['assetAddress'],
      },
    },
  • Primary MCP tool handler that validates the assetAddress input and calls the AaveClient to retrieve the price, then formats the response.
    case 'get_asset_price': {
      const assetAddress = args?.assetAddress as string;
      if (!assetAddress || typeof assetAddress !== 'string') {
        throw new McpError(
          ErrorCode.InvalidParams,
          'assetAddress parameter is required and must be a string'
        );
      }
    
      if (!aaveClient.isValidAddress(assetAddress)) {
        throw new McpError(
          ErrorCode.InvalidParams,
          'Invalid Ethereum address format'
        );
      }
    
      const price = await aaveClient.getAssetPrice(assetAddress);
    
      return {
        content: [
          {
            type: 'text',
            text: JSON.stringify(
              {
                assetAddress,
                priceUSD: price,
              },
              null,
              2
            ),
          },
        ],
      };
    }
  • Helper method in AaveClient that queries the Aave oracle contract for the asset price and formats it to USD string.
    async getAssetPrice(assetAddress: string): Promise<string> {
      const price = await this.oracleContract.getAssetPrice(assetAddress);
      // Oracle returns price with 8 decimals
      return ethers.formatUnits(price, 8);
    }
Behavior2/5

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

With no annotations provided, the description carries full burden but offers minimal behavioral insight. It states it 'gets' data (implying read-only), but doesn't disclose rate limits, error conditions, authentication needs, or what 'current' means (e.g., real-time vs. cached). It adds little beyond the basic operation.

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 appropriately sized for a simple tool. Every word earns its place.

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 low complexity (1 parameter, no output schema, no annotations), the description is minimally adequate. It covers the basic 'what' but lacks context on usage, behavior, or output format. For a read-only tool, it meets the bare minimum but leaves gaps.

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 'assetAddress' documented as 'Token contract address'. The description adds no additional meaning beyond this, such as format examples or validation rules. Baseline 3 is appropriate as the schema handles 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 with a specific verb ('Get') and resource ('current price for a specific asset'), and identifies the data source ('from Aave oracle'). It doesn't explicitly distinguish from siblings like 'get_aave_reserves', but the focus on price vs. reserves is implied. No tautology or misleading elements.

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, exclusions, or compare to sibling tools (e.g., 'get_aave_reserves' for broader data). Usage is implied by the purpose but lacks explicit context.

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

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