Skip to main content
Glama
Factor MCP Server

Factor MCP Server

Official
by FactorDAO

factor_lend_repay

Repay borrowed assets on Aave, Compound V3, Morpho, or Silo V2 through a Factor vault; specify an amount, percentage, or "all" to clear the debt.

Instructions

Repay borrowed assets to a lending protocol (Aave, Compound V3, Morpho, or Silo V2) through a Factor vault. Use amount "all" to repay the entire debt.

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": {
      "vaultAddress": "<vaultAddress>",
      "protocol": "<protocol>",
      "amount": "<amount>"
    },
    "name": "factor_lend_repay"
  }
}

Input Schema

NameRequiredDescriptionDefault
amountYesAmount to repay in base units (wei), or "all" to repay the entire debt, or a percentage like "50%" to repay that percentage of the debt
marketIdNoMorpho market ID (required for morpho)
passwordNoWallet password if encrypted
protocolYesThe lending protocol to repay to
debtAddressNoToken address of the debt to repay (required for aave, compoundV3, siloV2)
vaultAddressYesThe vault contract address
marketAddressNoMarket address (required for compoundV3 and siloV2)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.7.9

TDQS

B3.4/5.0
Behavior2/5

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

No annotations are supplied, so the description carries the entire burden. It does disclose the meaningful trait that the repayment is routed through a Factor vault rather than called on the protocol directly, but it says nothing about token approvals (a separate sibling, factor_give_approval, exists), permission requirements, transaction finality, or whether partial repayment leaves debt outstanding aside from the 'all' hint.

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 short sentences, front-loaded with the action and target, with no filler. The second sentence largely duplicates the schema's own description of the 'all' value, which is the only slight redundancy.

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?

For a seven-parameter, multi-protocol mutation with no annotations and no output schema, the description covers the core action but omits anything about approvals, protocol-specific routing beyond listing names, and expected outcomes. The rich schema carries most of the load, so the definition is adequate but not complete.

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 every one of the seven parameters, including the protocol-conditional marketId, debtAddress, and marketAddress, is already documented. The description's restatement of the 'all' value for amount adds no format or meaning beyond what the schema already says, so the baseline 3 applies.

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 ('Repay') and resource ('borrowed assets') plus the intermediary ('through a Factor vault'), and enumerates the four supported protocols. An agent can distinguish this from factor_lend_borrow, factor_lend_supply, and factor_lend_withdraw purely from the verb and object without opening any schema.

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 the parenthetical that amount 'all' repays the entire debt, which is closer to a parameter tip than a when-to-use rule. There is no statement about prerequisites (approvals, collateral position, vault manager rights) or about when to choose this over the sibling borrow/supply/withdraw tools, leaving the agent to infer usage.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Deploy Server

Other Tools