Skip to main content
Glama

Prepare a Loan Repayment

prepare_repay_loan_calldata

Builds an unsigned transaction blueprint for repaying a Gavel loan, including the prerequisite approval for the repayment amount.

Validates that the loan is live and that you are its borrower. Repay before maturity or the lender may claim your collateral.

Returns an unsigned transaction blueprint for the requested intent. The user is responsible for reviewing, signing, and broadcasting via their own wallet. Aletheia does not hold keys or dispatch transactions.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
loan_idYesThe loan to repay. See get_user_positions.
networkNoNetwork. Default 'arbitrum-one' (mainnet, real funds).arbitrum-one
borrower_addressYesYour address — must match the loan's borrower.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.3/5.0
Behavior5/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It clearly states the tool only builds an unsigned transaction blueprint, includes the approval, validates liveness and borrower identity, and that Aletheia does not hold keys or dispatch transactions. This is unusually transparent.

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?

The description is front-loaded with the core purpose and stays mostly lean. There is minor redundancy: 'Returns an unsigned transaction blueprint' largely restates the opening 'Builds an unsigned transaction blueprint,' but the rest of the content earns its place.

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?

Given there is no output schema, the description adequately explains what is returned (an unsigned transaction blueprint), the prerequisites (live loan, borrower), and the safety model (user signs and broadcasts; no keys held). It does not specify exact response shape or error behavior, but that is not essential for correct invocation.

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 documents loan_id, network, and borrower_address in sufficient detail. The description adds no significant parameter-level meaning beyond confirming the borrower must match the loan, which the schema already states.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/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: it 'Builds an unsigned transaction blueprint for repaying a Gavel loan' and includes the prerequisite approval. This clearly distinguishes it from sibling prepare_* tools that handle bids, collateral claims, refunds, and auction creation.

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 clear conditions for correct use: the loan must be live and the caller must be the borrower, and it warns to repay before maturity to avoid collateral loss. It does not explicitly name alternative tools or exclusions, but no repayment-specific sibling exists, so the context is sufficient.

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.