Skip to main content
Glama
Factor MCP Server

Factor MCP Server

Official
by FactorDAO

factor_swap_uniswap_exact_output

Swap tokens through Uniswap V3 via a Factor vault to receive an exact output amount. Set amountInMax to cap input spending or use "all" to spend the vault's full tokenIn balance.

Instructions

Swap tokens through Uniswap V3 via a Factor vault, specifying the exact output amount desired. Use amountInMax to set the maximum input you are willing to spend, or use "all" to allow spending the entire vault balance of tokenIn. Fee tiers: 100 (0.01%), 500 (0.05%), 3000 (0.3%), 10000 (1%).

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>",
      "amountOut": "<amountOut>"
    },
    "name": "factor_swap_uniswap_exact_output"
  }
}

Input Schema

NameRequiredDescriptionDefault
feeNoUniswap V3 fee tier: 100 (0.01%), 500 (0.05%), 3000 (0.3%), 10000 (1%). Default: 3000
tokenInYesAddress of the input token to swap from
passwordNoWallet password if encrypted
tokenOutYesAddress of the output token to receive
amountOutYesExact amount of output token desired in base units (wei)
amountInMaxNoMaximum amount of input token to spend in base units (wei), or "all" to use entire vault balance as maximum. If not provided when not using "all", defaults to "all".
vaultAddressYesThe vault contract address

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.7.9

TDQS

B3.4/5.0
Behavior3/5

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

No annotations are supplied, so the description carries the full burden. It usefully discloses that amountInMax caps spend and that 'all' consumes the entire vault balance of tokenIn — an important risk signal — but it omits whether the swap reverts on failure, slippage/deadline behavior, approval requirements, and 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.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Three short sentences with the core purpose front-loaded, followed by the spend-limit guidance and fee tiers. The fee-tier sentence largely duplicates the schema enum description, so it is slightly redundant but not harmful.

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 7-parameter mutating swap with no annotations and no output schema, the definition covers purpose and the key amountInMax parameter but leaves the agent without failure/revert behavior, approval prerequisites, or result expectations.

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 100%, so the schema already documents every parameter. The description reinforces amountInMax semantics (max input or 'all') and repeats the fee-tier enum values already in the schema, adding only marginal meaning beyond structured fields.

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 names a concrete verb+resource: swapping tokens through Uniswap V3 via a Factor vault with an exact output amount, which differentiates it semantically from the sibling factor_swap_uniswap (exact-input). It does not explicitly name that sibling to compare against, so routing is implied rather than stated.

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?

It explains how to constrain spend with amountInMax or 'all', which implies when you'd use this variant (you know the desired output). However, there is no explicit when-to-use-this-vs-exact-input guidance, and no prerequisites such as token approvals, vault balance, or the password requirement are mentioned.

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