Skip to main content
Glama

Borrow quote

gage_borrow_quote
Read-onlyIdempotent

The largest loan the partner vaults fund now for at most maxCollateral of a token, at the lowest fixed cost they accept; or one exact loan (collateral and principal) at the lowest cost that funds it now, or at your own costBps, with what each Loan grade costs; in USDG or the lend asset named, with a prepare object for gage_prepare_borrow.

Input Schema

NameRequiredDescriptionDefault
termYesLoan term in seconds, one of the terms gage_capabilities lists
tokenYes
walletNo
costBpsNoWith collateral and principal: your own fixed cost for the loan instead, bps of the amount borrowed, to a tenth (more digits are rounded); the quote's grades say what each Loan grade costs
lendAssetNoThe asset the loan is paid in and repaid in: USDG when omitted, or a lend asset gage_capabilities lists (its token address)
principalNoWith collateral: the exact amount to borrow, raw units of the loan's asset; priced at the lowest fixed cost the vaults funding it accept, or at costBps
collateralNoWith principal: the exact pledge of one chosen loan, raw units
maxCollateralNoMost of the token to pledge, raw units: quotes the largest loan the vaults fund for it, at the lowest fixed cost they accept

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changed
    • addedInput schema / properties / costBps
      Added value: +{
      +  "description": "With collateral and principal: your own fixed cost for the loan instead, bps of the amount borrowed, to a tenth (more digits are rounded); the quote's grades say what each Loan grade costs",
      +  "maximum": 5000,
      +  "minimum": 0.1,
      +  "type": "number"
      +}
    • changedInput schema / properties / maxCollateral / description
      Previous value: -"Most of the token to pledge, raw units: quotes the largest loan the vaults fund for it"New value: +"Most of the token to pledge, raw units: quotes the largest loan the vaults fund for it, at the lowest fixed cost they accept"
    • changedInput schema / properties / principal / description
      Previous value: -"With collateral: the exact amount to borrow, raw units of the loan's asset; priced as the borrow card prices it"New value: +"With collateral: the exact amount to borrow, raw units of the loan's asset; priced at the lowest fixed cost the vaults funding it accept, or at costBps"
  2. Changed4 schema fields changed
    • addedInput schema / properties / collateral
      Added value: +{
      +  "description": "With principal: the exact pledge of one chosen loan, raw units",
      +  "pattern": "^[1-9]\\d{0,77}$",
      +  "type": "string"
      +}
    • changedInput schema / properties / maxCollateral / description
      Previous value: -"Most of the token to pledge, raw units"New value: +"Most of the token to pledge, raw units: quotes the largest loan the vaults fund for it"
    • addedInput schema / properties / principal
      Added value: +{
      +  "description": "With collateral: the exact amount to borrow, raw units of the loan's asset; priced as the borrow card prices it",
      +  "pattern": "^[1-9]\\d{0,77}$",
      +  "type": "string"
      +}
    • changedInput schema / required
      Previous value: -[
      -  "token",
      -  "maxCollateral",
      -  "term"
      -]New value: +[
      +  "token",
      +  "term"
      +]
  3. First observed

TDQS

B3.4/5.0
Behavior3/5

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

Annotations already declare readOnly=true, idempotent=true, openWorld=true, destructive=false, so the safety profile is covered. The description adds real behavioral context: quotes reflect what vaults 'fund now' at the 'lowest fixed cost they accept', and the response carries per-grade costs plus a prepare object. It stops short of saying whether quoting has side effects on prepare state or how output is shaped, and it does not contradict the annotations.

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

Conciseness3/5

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

There is no filler, but the content is delivered as a single semicolon-chained run-on covering three modes and an output clause, which is hard to parse and buries the alternatives mid-sentence. The primary mode is front-loaded, but the structure should have been split into mode-per-sentence for scanability.

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?

For an 8-parameter, no-output-schema tool, the description is the only source of return-shape information, and it gives just a sketch ('what each Loan grade costs', 'a prepare object'). Key operational facts — what identifier the prepare object carries into gage_prepare_borrow, whether quotes expire, whether funding liquidity is live — are not covered. Adequate for mode selection, thin for interpreting the result.

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?

Schema coverage is 75%, so the baseline is 3, but the description earns above that by spelling out the parameter combinations: maxCollateral alone yields the largest fundable loan, collateral+principal yields one exact loan, and costBps overrides to a custom rate. It also records the default that omitted lendAsset means USDG. Only the wallet parameter and the raw-units conventions are left entirely to the schema.

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 states concretely what the tool computes: a borrow quote over three modes (largest loan for maxCollateral, exact collateral+principal loan, or own costBps), priced in USDG or a named lend asset, plus a prepare object. That is a specific resource and result, not a restatement of the name. It does not distinguish this from sibling gage_leverage_quote, and the run-on phrasing makes the purpose slower to grasp than it should be.

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?

The mode conditions are stated implicitly through the parameter pairings ('at most maxCollateral', 'one exact loan (collateral and principal)', 'at your own costBps'), which lets an agent infer which inputs select which behavior. It also points forward to gage_prepare_borrow, implying a quote-then-prepare workflow. But there is no explicit when-to-use/when-not guidance, and no statement of how it relates to gage_loan or gage_leverage_quote.

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.

Resources