Skip to main content
Glama

Bailouts: offers and what is owed

bailouts
Read-onlyIdempotent

Bailouts on a version 2 trade account (account, or the wallet's own): each live offer with its terms (at_ltv, to_ltv, max_usdg, fee_bps, term, expiry, foreclosure bound) and what a rescue takes now by the account's own lens (needed, and needed if the account's bUSDG cannot be redeemed when it lands; what to approve; what the account's free USDG and bUSDG put in ahead of the rescuer; the position's equity against the claim; past its LLTV or under water; an offer the account's bUSDG helps cover reads takeable; takeable or why not), and the bailout owed if any (the rescuer, the principal, what is owed now with the fee earned so far, maturity, whether the rescuer may foreclose now and within what bound). With wallet, also what the account keeps for that wallet to claim. With neither account nor wallet: the offers a rescuer can take across the newest 50 version 2 accounts, the takeable ones ahead, each with its prepare call (Borro's keeper lists every takeable offer at /jobs.json). A rescue is the rescuer's own USDG lent against the rescued position plus money that arrives in the account while it is owed: if the position is liquidated anyway the rescuer can lose it.

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": "bailouts"
  }
}

Input Schema

NameRequiredDescriptionDefault
walletNoThe account's owner (when account is not given), or a wallet whose claims to show
accountNoA version 2 trade account (optional)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A3.6/5.0
Behavior4/5

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

Annotations already cover the read-only, idempotent, non-destructive profile, and the description adds genuinely useful context beyond that: the newest-50-account scan bound, the meaning of 'takeable', the assumption about bUSDG being unredeemable when it lands, and the loss risk to a rescuer if the position is liquidated anyway. The only gap is that it does not say how the view behaves when the account is not found or not a version 2 account.

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

Conciseness2/5

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

It is a single ~200-word run-on sentence with deeply nested parentheses enumerating field names, which makes it hard to scan and pushes the key scope statement ('newest 50 version 2 accounts') to the very end. The content is dense but the structure actively impedes parsing. Front-loading exists but is immediately lost.

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?

With no output schema, the description carries the burden of explaining return values and does so thoroughly: offer terms, needed amounts, approval targets, equity versus claim, and the owed/foreclosure state. It also covers all three parameter modes. Only the edge cases (invalid or non-v2 account, truncation behavior of the 50-account scan) are unaddressed.

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 100%, so the baseline is 3, but the description goes further by mapping each parameter combination to a distinct output: wallet alone yields the wallet's claims, account yields the account's own lens, and neither triggers the cross-account scan. That is semantic meaning the schema strings do not convey. It falls short of 5 only because precedence when both account and wallet are supplied is left ambiguous.

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 a concrete read resource: live bailout offers with their terms and what a rescue/owed amount looks like for a version 2 trade account. It is separable from the write-side siblings (bailout_offer, bailout_repay, bailout_foreclose) because it repeatedly frames itself as reporting state. It loses a point because the single run-on sentence buries the verb, so the agent has to reconstruct that this is a retrieval tool rather than a query/mutation.

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?

It does specify behavior per argument combination (with wallet, with account, with neither), which is real usage guidance. However, it never names an alternative tool or states when to call bailout_offer, bailout_claim, or keeper_jobs instead — keeper_jobs is only mentioned as an external URL where offers are listed. The routing signal is implied rather than explicit.

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