Skip to main content
Glama
Factor MCP Server

Factor MCP Server

Official
by FactorDAO

factor_swap_openocean

Swap tokens through the OpenOcean DEX aggregator from a Factor vault, automatically fetching a swap route and accepting exact, percentage, or full-balance amounts.

Instructions

Swap tokens through OpenOcean DEX aggregator via a Factor vault. Works on all chains including Base. Automatically fetches the best swap route from OpenOcean. Supports "all" to swap entire vault balance, percentage amounts like "50%", or exact amounts in base units (wei).

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>",
      "tokenIn": "<tokenIn>",
      "tokenOut": "<tokenOut>",
      "amount": "<amount>"
    },
    "name": "factor_swap_openocean"
  }
}

Input Schema

NameRequiredDescriptionDefault
amountYesAmount in base units (wei), or "all" to swap entire vault balance, or "50%" for percentage
tokenInYesAddress of the input token
passwordNoWallet password if encrypted
slippageNoSlippage tolerance as a percentage (e.g., 1 for 1%). Default: 1
tokenOutYesAddress of the output token
vaultAddressYesThe vault contract address

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.7.9

TDQS

A3.6/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 that the best route is fetched automatically from OpenOcean and that the tool operates across all chains, but it omits the important traits of a fund-moving mutation: whether token approvals are required, whether the wallet password is needed, gas handling, and what happens on a failed route.

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?

Four short sentences, front-loaded with the purpose and route behavior before the amount-format note. Almost no waste, though the amount-format sentence duplicates schema content and could have been spent on approvals or return behavior instead.

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 six-parameter value-moving tool with no annotations and no output schema, the definition covers purpose, routing, chain coverage, and amount modes but leaves approval requirements, failure behavior, and return value unexplained. Adequate but with clear gaps for a destructive operation.

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 baseline is 3. The description restates the amount formats ("all", "50%", wei) already documented in the schema and adds nothing about slippage or password semantics, so it does not exceed the schema's contribution.

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?

States a specific verb and resource chain: swap tokens through the OpenOcean DEX aggregator via a Factor vault. The aggregator name and vault routing distinguish it from siblings such as factor_swap_uniswap and factor_swap_pendle without opening either 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?

Adds useful selection context by noting it works on all chains including Base, which implies broader coverage than chain-specific swap siblings. However, it never says when to prefer this over factor_swap_uniswap or factor_swap_pendle, so the agent must infer the routing decision.

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