Skip to main content
Glama

Prepare a buyback

build_buyback
Read-onlyIdempotent

Returns the unsigned transactions to pay back a loan and get collateral back: a USDC approval (only if needed) then buyback. Omit payment_usdc to pay the full remaining amount.

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>",
      "borrower": "<borrower>"
    },
    "name": "build_buyback"
  }
}

Input Schema

NameRequiredDescriptionDefault
loan_idYesLoan ID
borrowerYes
payment_usdcNo

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?

Annotations already declare readOnlyHint=true, idempotentHint=true and destructiveHint=false, and the description is consistent with them by framing the output as unsigned transactions rather than an executed repayment. Beyond that it discloses a non-obvious behavioral trait: the returned batch may start with a USDC approval that is included 'only if needed', which affects how the caller must handle the result. It omits gas/allowance requirements and who signs, so it is not fully transparent.

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?

Two sentences, zero waste. The output shape and transaction sequence come first, and the conditional payment rule is placed last where it belongs. Nothing is padded or repeated from the schema.

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

Completeness3/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 value, and it does so only loosely ('unsigned transactions ... a USDC approval then buyback') without indicating the container shape or ordering guarantees beyond sequence. For a three-parameter transaction builder, the unexplained borrower parameter and absent signing/allowance context leave real gaps.

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 only 33% (only loan_id is described in the schema), so the description must compensate. It does add real meaning for payment_usdc by defining the omit-means-full-remaining semantics, which the bare pattern does not convey. borrower is left entirely unexplained — its relationship to the caller or loan is never stated — so the compensation is only partial.

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?

States a specific verb and output ('Returns the unsigned transactions') and a specific operation ('pay back a loan and get collateral back'), plus the internal sequence (approval then buyback). An agent can tell this is a transaction-builder for repayment rather than a state read or a generic build_* action. It stops short of naming a sibling alternative, but the action is unambiguous.

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?

The only guidance is conditional on a parameter: 'Omit payment_usdc to pay the full remaining amount', which is genuinely useful partial-vs-full repayment guidance. There is no statement of when to prefer this over other build_* tools or any prerequisite (e.g., that the caller must hold the USDC or sign the returned transactions). Usage is implied rather than directed.

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.