Skip to main content
Glama

get_lending_rates

Read-onlyIdempotent

Per-pool supply and borrow rates across DeFi lending protocols such as Aave, Compound and Morpho, largest pool (TVL) first. Pass symbol (the pool asset, e.g. USDC), protocol (e.g. aave-v3), chain and/or min_tvl_usd to narrow it. Results are one page: limit 1-100 (default 25), offset 0-10000; pass next_offset to get the next page. Useful for rate-spread screens and stablecoin yield analysis. Use it when the user asks about lending rates, borrow costs or DeFi yield.

[Access: pay 0.01 USDC via x402 (PAYMENT-SIGNATURE header) OR authenticate with an API key. An x402-capable client will auto-pay; API-key clients pay nothing per call.]

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "get_lending_rates"
  }
}

Input Schema

NameRequiredDescriptionDefault
chainNoChain name or slug, e.g. ethereum or base.
limitNoMaximum results.
offsetNoPagination offset in the result units documented by the tool; zero starts the first page.
symbolNoAsset symbol, e.g. BTC or ETH.
protocolNoProtocol or token name, DefiLlama slug or CoinGecko id, case-insensitive exact match.
min_tvl_usdNoLeave out pools with less than this total value locked, in USD.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed6 schema fields changed
    • addedInput schema / properties / chain
      Added value: +{
      +  "description": "Chain name or slug, e.g. ethereum or base.",
      +  "type": "string"
      +}
    • addedInput schema / properties / limit
      Added value: +{
      +  "default": 25,
      +  "description": "Maximum results.",
      +  "type": "integer"
      +}
    • addedInput schema / properties / min_tvl_usd
      Added value: +{
      +  "description": "Leave out pools with less than this total value locked, in USD.",
      +  "type": "number"
      +}
    • addedInput schema / properties / offset
      Added value: +{
      +  "default": 0,
      +  "description": "Pagination offset in the result units documented by the tool; zero starts the first page.",
      +  "type": "integer"
      +}
    • addedInput schema / properties / protocol
      Added value: +{
      +  "description": "Protocol or token name, DefiLlama slug or CoinGecko id, case-insensitive exact match.",
      +  "type": "string"
      +}
    • addedInput schema / properties / symbol
      Added value: +{
      +  "description": "Asset symbol, e.g. BTC or ETH.",
      +  "type": "string"
      +}
  2. First observed

TDQS

A4.2/5.0
Behavior5/5

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

The annotations already tell the agent this is a safe, idempotent read; the description adds material behavior that annotations do not carry — payment of 0.01 USDC via x402 or API-key auth, that an x402-capable client auto-pays, and one-page result sizing with an explicit 1-100 limit and 0-10000 offset. That is exactly the kind of context an agent needs before calling a paid, paginated endpoint.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The purpose and ordering lead the description, followed by filters, pagination, and access terms — a sensible front-loaded order with no filler sentences. It is on the dense side, and the access/payment note sits slightly outside the main flow, but every sentence carries information an agent would use.

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

Completeness4/5

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

For a six-parameter, fully optional, read-only tool with no output schema, the description covers filtering, ordering, page sizing, pagination continuation, auth, and cost — enough to call it correctly. The only real gap is the shape of the returned per-pool records, which matters more here because no output schema exists to document them.

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

Parameters4/5

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

With schema coverage at 100%, the baseline is 3; this description adds meaning beyond it, clarifying that symbol means the pool asset, giving aave-v3 as a protocol slug example, describing min_tvl_usd as a narrowing filter, and specifying the undocumented limits (limit 1-100 default 25, offset 0-10000) plus a next_offset handoff for paging. It introduces next_offset, which is not in the schema and could momentarily confuse an agent about whether it is a callable parameter.

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 names the resource precisely: per-pool supply and borrow rates across named lending protocols, with a stated ordering (largest pool by TVL first). It implicitly separates itself from rate-adjacent siblings like get_perp_funding_rates by framing the use case as 'lending rates, borrow costs', but it never names an actual sibling tool.

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

Usage Guidelines4/5

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

The description gives clear when-to-use language ('Use it when the user asks about lending rates, borrow costs or DeFi yield') and names concrete scenarios (rate-spread screens, stablecoin yield analysis). It does not state when not to use it or which sibling to pick instead for overlapping queries such as protocol TVL or perp funding.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.