Skip to main content
Glama

Quote a loan

quote_borrow
Read-onlyIdempotent

Exact loan quote using the same math the contract runs: USDC you receive after the fee, buyback cost, due date, and how much collateral is used. It replays the lender queue, so the funded amount matches what the loan would really get, and warns (with a suggested amount) when a loan would be funded short.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "asset": "<asset>",
      "collateral_amount": "<collateral_amount>",
      "term": "<term>"
    },
    "name": "quote_borrow"
  }
}

Input Schema

NameRequiredDescriptionDefault
termYesLoan term: short, medium or long (or 0/1/2). Durations and costs come from get_protocol_info.
assetYesToken contract address on Base (preferred) or its symbol, e.g. WETH, VIRTUAL, esALB
loan_amount_usdcNoLoan amount before the fee. Omit to borrow the most the collateral allows.
collateral_amountYesCollateral to offer, in token units, e.g. 0.5

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4/5.0
Behavior4/5

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

Annotations already declare readOnly/idempotent/non-destructive, so the safety profile is covered. The description adds genuinely new behavior: it replays the lender queue so the funded amount reflects reality, and it warns with a suggested amount when a loan would be funded short. It stops short of describing pagination or error cases, but that is minor for a pure quote.

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?

Two dense sentences with zero filler; the concrete outputs are front-loaded, followed by the faithfulness guarantee and the shortfall-warning behavior. Every clause carries information.

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 four-parameter read-only quote with no output schema, the description does most of the work by naming the returned fields and the shortfall warning. It leaves the exact response shape and the suggested-amount field name implicit, which is a small gap but not a blocking one.

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%, so all four parameters, including the term enum and the "omit to borrow max" rule, are already documented in the schema. The description adds no syntax or format detail beyond implying that collateral usage and fee-adjusted proceeds are derived from the inputs.

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

Purpose5/5

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

States a specific verb and resource ("Exact loan quote") and enumerates exactly what it returns: USDC received after fee, buyback cost, due date, collateral used. The word "quote" plus the read-only framing distinguishes it from the build_* siblings without naming them.

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

Usage Guidelines3/5

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

Usage is only implied – the definition never says "call this before build_borrow" or contrasts it with simulate_transaction, even though build_borrow is the obvious execution counterpart. An agent can infer a preview-then-build flow, but nothing is stated explicitly.

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.