Skip to main content
Glama

Prepare: repay a gAIX loan and take gAIX back

gaix_repay
Read-onlyIdempotent

Unsigned transactions to repay a gAIX loan from the wallet (part, or all: true to clear it exactly) and, if asked, take gAIX back to the wallet (take_back: shares, or "all"). Repaying always works, weekends included; taking gAIX back while a loan stays open pauses every weekend and whenever a basket price is out of date, and keeps the loan under three quarters of its limit. 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": "gaix_repay"
  }
}

Input Schema

NameRequiredDescriptionDefault
allNotrue repays everything owed
amountNoUSDG to repay, as a decimal string, like "100"
walletYesThe wallet's address (0x...); the transactions are built for it to sign
take_backNogAIX to take back, in shares as a decimal string, or "all"

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4/5.0
Behavior5/5

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

Annotations only declare the safe-read profile (readOnlyHint, idempotentHint, non-destructive); the description goes well beyond them by disclosing that output is unsigned transactions for the wallet to sign, that it is simulated from the wallet, that repayment works on weekends, and that take_back pauses on weekends or stale basket prices and keeps the loan under three quarters of its limit.

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

Conciseness4/5

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

Three sentences, front-loaded with the core action and followed by operational caveats; every clause carries information. The long middle sentence packing weekend/stale-price/limit constraints is dense but not padded.

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, no-output-schema preparation tool, the description covers what is produced (unsigned transactions), the simulation model, and the main failure conditions for take_back. It stops short of describing what the prepared transaction payload looks like or whether amount and take_back can be combined, which is a minor gap.

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 adds real meaning: 'all: true to clear it exactly' clarifies the interaction between partial repayment and exact clearing, and 'take_back: shares, or "all"' explains the accepted form of that string parameter.

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 specific verb and resource: build unsigned transactions to repay a gAIX loan, with an optional take-back of gAIX. The gAIX qualifier cleanly separates it from generic 'repay' / 'credit_repay' / 'bailout_repay' siblings, though no sibling is named explicitly.

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 implied by the resource ('repay a gAIX loan') and the conditional 'if asked, take gAIX back' framing, plus useful conditions under which take_back fails (weekends, stale basket price). There is no explicit statement of when to prefer this over gaix_borrow, gaix_withdraw, or repay, so the routing guidance stays implicit.

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