Skip to main content
Glama

Prepare: pay a bailout back

bailout_repay
Read-onlyIdempotent

Unsigned transactions paying the bailout owed on a version 2 trade account: from the wallet (the owner, usually; anyone may), an exact USDG approval to the account and payBailout, the rescuer ahead of Borro's cut, with an hour of the fee's growth allowed so it still pays it all when it lands (amount pays part); paid in full, the lien lifts at once. With from_account: true, repayBailout instead (anyone): it pays from what sits in the account, its free USDG and the bUSDG it takes, and once the rescued position has no debt left it hands that position's collateral to the rescuer as it is, up to what is owed, and ends the lien. Refused in words when nothing is owed. 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>"
    },
    "name": "bailout_repay"
  }
}

Input Schema

NameRequiredDescriptionDefault
amountNoHow much to pay from the wallet (default: everything owed), in whole USDG as a decimal string, like "250"
walletYesThe wallet's address (0x...); the transactions are built for it to sign
accountNoA version 2 trade account's address (default: the wallet's own, as its owner; an agent gives its owner's account)
from_accountNotrue: settle from what sits in the account (repayBailout) instead of the wallet

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?

Beyond the annotations, it discloses real behavior: an exact USDG approval plus payBailout, an hour of fee growth allowed so the transfer still lands, partial payment via 'amount pays part', immediate lien lift on full payment, collateral handed to the rescuer under from_account, and verbal refusal when nothing is owed. The readOnlyHint=true is consistent since the tool only builds unsigned transactions. It does not say what the transaction payload or simulation result looks like, but the safety profile is well covered.

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 and the primary action is front-loaded, but the prose is a single dense block of semicolon-chained clauses that is hard to parse ('the rescuer ahead of Borro's cut, with an hour of the fee's growth allowed so it still pays it all when it lands'). Restructuring into the wallet path and the from_account path as separate sentences would preserve the same content and cut reading effort.

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 four parameters, full schema coverage, and annotations covering safety, the description supplies what is missing: the two payment paths, refusal behavior, and the simulation step ('Simulated from the wallet'). The only gap is the shape of the returned unsigned transactions, which is partly implied but never stated.

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 coverage is 100%, so the schema already documents wallet, account, amount default and from_account. The description adds only marginal semantic detail, clarifying that the wallet is 'the owner, usually' and that amount may pay only part, but does not expand on units, formats, or defaults beyond the schema. Baseline 3 is appropriate.

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 states a specific verb and resource: unsigned transactions that pay the bailout owed on a version 2 trade account. It is distinguishable from bailout_claim/bailout_offer/bailout_cancel by naming the 'pay back' action, but the phrasing is tangled enough (rescuer, Borro's cut, lien) that an agent must read twice to confirm what is produced.

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 route within the tool: 'With from_account: true, repayBailout instead (anyone)' gives a clear branch condition, and 'anyone may' relaxes the permission assumption. However, there is no guidance on when to use this versus sibling tools such as bailout_claim or bailout_foreclose, and no stated prerequisite (e.g., that a bailout must exist and be owed).

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