Skip to main content
Glama

prepare_uniswap_v3_decrease_liquidity

DestructiveIdempotent

Prepare an unsigned Uniswap V3 decrease-liquidity transaction. Remove a percentage or exact amount of liquidity from a tokenId you own.

Instructions

Build an unsigned Uniswap V3 LP decreaseLiquidity transaction — removes liquidity from an existing position by tokenId. Pass liquidityPct: 100 for a full close-out (typical follow-up: prepare_uniswap_v3_collect, then optionally prepare_uniswap_v3_burn). Pass liquidity: "<raw>" for exact-amount accounting; the two args are mutually exclusive. Hard-refuses when the tokenId is not owned by wallet (would credit the actual owner) and when the position has zero liquidity (nothing to decrease). Withdrawn tokens become tokensOwed on the position — they do NOT move to the wallet until you call prepare_uniswap_v3_collect afterwards. This separation matches the on-chain protocol shape and lets the agent batch decrease+collect via rebalance.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
walletYes
chainNoethereum
tokenIdYesERC-721 tokenId of the LP NFT to decrease liquidity from. Must be owned by `wallet`.
liquidityPctNoPercentage of position liquidity to withdraw (1-100). Pass 100 for full close-out (typical follow-up: prepare_uniswap_v3_collect, then optionally burn). Mutually exclusive with `liquidity` — pass exactly one.
liquidityNoRaw liquidity to withdraw (decimal-string bigint). Use when you need exact accounting; otherwise prefer liquidityPct. Mutually exclusive with `liquidityPct`.
slippageBpsNoSlippage tolerance in bps. Default 50; soft cap 100.
acknowledgeHighSlippageNo
deadlineSecNo
Behavior5/5

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

Annotations already indicate destructive and idempotent behavior. The description adds critical behavioral details: withdrawn tokens become tokensOwed and do not move to the wallet until collect is called, hard-refuses for ownership/zero liquidity, and mutual exclusivity of liquidityPct and liquidity. No contradictions with annotations.

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?

The description is a single paragraph of 5-6 sentences, front-loaded with the purpose. Every sentence adds information without redundancy, making it concise and easy to parse.

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

Completeness4/5

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

Given the complexity of Uniswap V3, the description explains the two-phase process, prerequisites, and mutual exclusivity. While no output schema is provided, the tool's return type (unsigned transaction) is implied and consistent with similar tools on the server. Minor gap: no mention of output format, but not critical for agent invocability.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 50%. The description adds value beyond the schema by explaining the use cases for liquidityPct (full close-out) and liquidity (exact accounting), and their mutual exclusivity. It does not cover all parameters (e.g., deadlineSec) but clarifies the key ones effectively.

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 clearly states it builds an unsigned Uniswap V3 LP decreaseLiquidity transaction, specifying the verb (build) and resource (decreaseLiquidity transaction by tokenId). It differentiates from sibling tools like prepare_uniswap_v3_collect and prepare_uniswap_v3_burn by mentioning the typical follow-up flow, which establishes a clear purpose and context.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides explicit guidance on when to use the tool: for decreasing liquidity, with examples like using liquidityPct:100 for full close-out and raw liquidity for exact accounting. It mentions hard-refuses for invalid token ownership or zero liquidity, and explains the two-phase protocol separation. While it does not explicitly list when not to use it, the follow-up steps and mutual exclusivity of parameters give clear context.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/szhygulin/vaultpilot-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server