Skip to main content
Glama
Factor MCP Server

Factor MCP Server

Official
by FactorDAO

factor_lend_withdraw

Withdraw supplied assets from Aave, Compound V3, Morpho, or Silo V2 via a Factor vault. Specify amount as 'all', a percentage, or base units; for Morpho, set collateral=true for collateral.

Instructions

Withdraw supplied assets from a lending protocol (Aave, Compound V3, Morpho, or Silo V2) through a Factor vault. Use amount "all" to withdraw the entire supplied balance. For Morpho, set collateral=true to withdraw collateral.

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_withdraw"
  }
}

Input Schema

NameRequiredDescriptionDefault
amountYesAmount in base units (wei), or "all" to withdraw the entire supplied balance, or a percentage like "50%" to withdraw that percentage of the supplied balance
marketIdNoMorpho market ID (required for morpho)
passwordNoWallet password if encrypted
protocolYesThe lending protocol to withdraw from
collateralNoFor Morpho: withdraw collateral instead of supplied assets. Default: false
assetAddressNoToken address to withdraw (required for aave, compoundV3, siloV2)
vaultAddressYesThe vault contract address
marketAddressNoCompound V3 market address (required for compoundV3)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.7.9

TDQS

A3.5/5.0
Behavior3/5

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

With no annotations, the description carries the full burden. It usefully discloses protocol-specific behavioral branches (Morpho collateral vs supplied assets) and the 'all' full-exit semantic, but says nothing about authorization (a password/signer is required), whether a withdrawal is partial-safe or irreversible, what happens if liquidity is insufficient, or what the call returns.

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?

Three short sentences, each doing work, with the action and supported protocols front-loaded and the two mode modifiers following. No preamble, hedging, or 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 an 8-parameter, multi-protocol mutation tool with no annotations and no output schema, the description covers purpose and the two special modes but omits return value (transaction hash? receipt?), error/failure behavior, and permission requirements. The rich schema compensates for parameter naming, but the behavioral envelope is only half-covered.

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 parameter including amount formats, marketId/marketAddress/assetAddress protocol requirements, and the collateral flag is already documented. The description's mentions of 'all' and collateral=true restate the schema rather than adding new semantics, so the baseline 3 applies.

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 resource ('withdraw supplied assets from a lending protocol') and enumerates the four supported protocols plus the Factor-vault framing. It is clear what the tool does, but it never distinguishes itself from the read-only/other withdraw siblings (factor_withdraw, factor_preview_withdraw, factor_lend_supply), so an agent must infer the boundary.

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?

Usage is implied by the mirror-image relationship to supply/borrow in the same family, and the description gives two concrete invocation modes ('all' for full exit, collateral=true for Morpho). There is no explicit statement of when to choose this over factor_withdraw or factor_preview_withdraw, and no prerequisites or preconditions beyond the protocol branches.

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