Skip to main content
Glama

Prepare paying off a loan

repay_loan_against_land

Prepare paying off the open DeFi lending pool loan on a property (Sepolia Testnet), or the one named by loanId, with the payoff amount today. A loan is open while active and, past maturity, in default until the pool's auction starts. Checks first that the loan is open and the wallet is its borrower, and warns when it is past maturity. Paying off returns the token to the wallet, free of the loan. Prepared, not sent: returns a signRequest (summary, warnings, signLink to fabrica.land, expiresAt 15 minutes out, payload null for now) and stores it so the sign page can load it. The person opens the link, signs in with that wallet and signs; nothing happens until then. The server holds no keys and submits nothing. wallet is the address that will sign.

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": "repay_loan_against_land"
  }
}

Input Schema

NameRequiredDescriptionDefault
slugNoProperty slug from the URL
loanIdNoThe loan to pay off (default: the property's open loan, active or in default)
walletYesThe wallet that will sign (0x address). The sign page only lets this wallet sign.
tokenIdNoThe token ID of the property

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.5/5.0
Behavior5/5

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

The description adds substantial behavioral context beyond the annotations: it checks loan status and borrower ownership, warns about maturity, returns a signRequest with warnings and a 15-minute expiry, stores the request, and explicitly says the server holds no keys and submits nothing. These details are critical for an agent to understand that the mutation is only prepared and requires user signing.

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

Conciseness5/5

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

The description is front-loaded with the core action and then moves through checks, return behavior, and signing workflow without wasted sentences. Given the complexity of the prepare-only workflow, the length is justified and efficient.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

There is no output schema, but the description explains the signRequest return shape, expiry, storage behavior, and signing flow sufficiently. Combined with annotations and full parameter schema coverage, an agent has what it needs to invoke and interpret the tool correctly.

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 all four parameters. The description adds some useful meaning for loanId and wallet, but does not materially expand beyond the schema for slug or tokenId, making the baseline 3 appropriate.

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: preparing repayment of an open DeFi lending pool loan on a property or by loanId. It also clarifies that this prepares rather than sends the repayment, which meaningfully separates it from execution and signing tools.

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 clearly explains the context for use: the loan must be open and the wallet must be the borrower, and it warns when the loan is past maturity. It does not explicitly name when to use a different sibling such as get_sign_request or get_loan_against_land, but the conditions are otherwise clear.

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.