Skip to main content
Glama
Factor MCP Server

Factor MCP Server

Official
by FactorDAO

factor_swap_pendle

Swap tokens to or from Pendle Principal Tokens (PT) and Yield Tokens (YT) via a Factor vault; use 'all' to swap an entire vault balance.

Instructions

Swap between tokens and Pendle Principal Tokens (PT) or Yield Tokens (YT) via a Factor vault. Directions: tokenToPT, tokenToYT, ptToToken, ytToToken. For tokenToPT and tokenToYT, "all" swaps entire vault balance.

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>",
      "marketAddress": "<marketAddress>",
      "direction": "<direction>",
      "tokenAddress": "<tokenAddress>",
      "amount": "<amount>"
    },
    "name": "factor_swap_pendle"
  }
}

Input Schema

NameRequiredDescriptionDefault
amountYesAmount in base units (wei), or "all" for tokenToPT/tokenToYT to swap entire balance
passwordNoWallet password if encrypted
directionYesSwap direction: tokenToPT, tokenToYT, ptToToken, ytToToken
approxParamsNoOptional approximation parameters from Pendle API for better execution
tokenAddressYesThe token address (input token for tokenToPT/tokenToYT, output token for ptToToken/ytToToken)
vaultAddressYesThe vault contract address
marketAddressYesThe Pendle market address

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.7.9

TDQS

B3.1/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 behavioral burden, and it discloses almost nothing beyond mechanics already in the schema. It does not say whether token approval must happen first, how slippage/approxParams affect execution, whether this requires a password, or that it is an irreversible on-chain mutation, all of which matter for a financial write tool.

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?

Three short sentences, front-loaded with the core verb and resource, with no filler. The middle sentence restating the four direction names duplicates the schema enum, which is minor waste but the only redundancy.

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

Completeness2/5

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

This is a 7-parameter mutation tool with a nested object, no annotations, and no output schema, yet the description never explains the vault/market relationship, what the caller receives back, or the role of password and approxParams. For a high-complexity financial tool with zero annotation coverage, the definition leaves too much for the agent to infer.

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 the direction enum, amount semantics, and the nested approxParams object is already documented in the schema. The description restates the direction values and the "all" amount behavior rather than adding new meaning, so the baseline 3 is correct.

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?

The description states a specific verb (swap) and a specific resource (Pendle PT/YT via a Factor vault), which clearly separates it from generic swap siblings like factor_swap_uniswap and from the LP sibling factor_pendle_lp. It does not explicitly name an alternative tool, so it stops short of full sibling differentiation.

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 four direction values give an implicit usage map (which direction to pick depending on the tokens you hold), and the note about "all" clarifies one calling pattern. However, there is no explicit when-to-use vs when-not guidance, no mention of the LP alternative, and no stated prerequisites such as approvals or market availability.

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