Skip to main content
Glama

MIRAI

Prepare a repayment

prepare_repay
Read-only

UNSIGNED transactions to repay a loan in full: a USDG approval when the payer's allowance is short, then the repayment. Anyone can repay any loan.

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": {
      "loan_id": "<loan_id>"
    },
    "name": "prepare_repay"
  }
}

Input Schema

NameRequiredDescriptionDefault
fromNopayer address, to check the allowance
loan_idYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.7/5.0
Behavior4/5

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

readOnlyHint=true is consistent with a tool that only builds transactions, and the description adds genuine context: the output is unsigned, an extra USDG approval transaction appears conditionally when allowance is short, and there is no caller restriction. It stops short of saying explicitly that nothing is submitted on-chain or what chain/asset assumptions apply.

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?

Two compact sentences, with the key fact (unsigned transactions) and the two-step structure front-loaded. The trailing permission sentence is useful but slightly disconnected from the mechanics.

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 the return, and it does so at a high level (approval plus repayment transactions), though it does not describe the payload shape an agent would need to sign or forward. That is a modest gap for a two-parameter prepare tool.

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 50%: 'from' is documented in the schema and reinforced by the description's allowance-check explanation, but 'loan_id' carries no description in either place. Baseline 3 applies since the schema does half the work and the description only partially compensates.

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 names a specific verb and resource ('UNSIGNED transactions to repay a loan in full') and adds an important scope constraint (full repayment, not partial). It is clearly distinguishable from prepare_borrow, though it never explicitly contrasts itself with that sibling.

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 states the permissive condition ('Anyone can repay any loan'), which tells an agent who may call it, but gives no when-to-use guidance relative to alternatives such as quote_loan or pay_brief, and no prerequisites (e.g., that the result must be signed and submitted elsewhere).

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.