Skip to main content
Glama

Prepare: rescue a position (take a Bailouts offer)

bailout
Read-onlyIdempotent

For rescuers: unsigned transactions taking an offer on a version 2 trade account, from the wallet's own USDG: an exact USDG approval to the account of what its lens says to approve (what the rescue takes if the account's bUSDG cannot be redeemed, plus 100 bps, for interest, the price and the vault before it lands), then bailout(offer_id, amount). The account works out what it takes when it lands: what brings the LTV to the offer's to_ltv plus 50 bps of it, less its own idle money, at most max_usdg; if the idle money alone does it, nothing is taken. Refused in words when the offer cannot be taken now (under its LTV, expired, a bailout owed already, over its max, the long's debt floor) or the wallet holds too little. The answer gives what you are owed (the principal, your part of the fee within a day and at maturity, Borro's cut of the fee, 1000 bps of it), the position's equity against the claim, and when you may foreclose. Rescues run at any hour. 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. Borro's keeper never rescues. Simulated from the wallet.

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": {
      "wallet": "<wallet>",
      "account": "<account>",
      "offer_id": "<offer_id>"
    },
    "name": "bailout"
  }
}

Input Schema

NameRequiredDescriptionDefault
walletYesThe wallet's address (0x...); the transactions are built for it to sign
accountYesThe version 2 trade account's address
max_usdgNoThe most the rescue may take from the wallet (default: the lens's approve), in whole USDG as a decimal string, like "250"
offer_idYesThe offer's number (bailouts shows each one's)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A3.8/5.0
Behavior4/5

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

With readOnlyHint, idempotentHint, and destructiveHint=false already covering the safety profile, the description still contributes real behavioral content: the approval is sized to the lens figure plus 100 bps, the take is the amount that brings LTV to to_ltv plus 50 bps less idle money capped by max_usdg, and the rescuer can lose their USDG if the position is liquidated anyway. That risk disclosure and the refusal-mode list are genuinely beyond the annotations. It loses a point because the crucial 'Simulated from the wallet' qualifier is buried at the very end, leaving the read-only-versus-builds-transactions relationship under-emphasized.

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?

The purpose and the refusal behavior are front-loaded, and most sentences carry information an agent needs (approval sizing, failure modes, return contents, liquidation risk). But the prose is dense and clause-chained; phrases like 'for interest, the price and the vault before it lands' cost the reader more than they return, and key facts such as the simulation qualifier and the loss warning are stranded at the end.

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 4-parameter tool with no output schema, the description covers what the agent needs: what is prepared, what is approved, what the account takes on landing, when it is refused, and what the answer reports (principal, fee share, Borro's cut, equity against the claim, foreclosure timing). The only meaningful gap is not stating explicitly how the prepared transactions get signed and submitted.

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 the schema already explains wallet, account, max_usdg (including the lens-approve default), and offer_id. The description only adds that the take is bounded by the LTV target and that nothing is taken if idle money suffices, which sharpens max_usdg slightly but is not new syntax or format guidance. Baseline 3 applies when the schema does 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 opening clause names a concrete verb and resource: preparing the unsigned transactions that take a Bailouts offer on a version 2 trade account, funded from the wallet's own USDG, followed by bailout(offer_id, amount). That is specific enough to separate it from the sibling listing tool (bailouts) and the post-rescue tools (bailout_claim, bailout_foreclose). It does not name a sibling as an explicit alternative, and the embedded clause describing the approval amount is close to unparseable, which blunts the clarity.

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?

It gives concrete exclusion conditions: the offer is refused in words when it is under its LTV, expired, already owed a bailout, over its max, or under the long's debt floor, and when the wallet holds too little. It also states 'Rescues run at any hour' and that Borro's keeper never rescues, which tells the agent this is a user-driven path. It never routes the agent to a named alternative tool, so it stops short of a 5.

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