Skip to main content
Glama

prepare_uniswap_v3_decrease_liquidity

DestructiveIdempotent

Prepares an unsigned Uniswap V3 decreaseLiquidity transaction to withdraw liquidity from a position. Specify percentage or raw amount; withdrawn tokens become tokensOwed and require a subsequent collect call.

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
Behavior4/5

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

Annotations already indicate destructive and idempotent. The description adds value by stating hard-refusal conditions (not owned, zero liquidity) and clarifying that withdrawn tokens become tokensOwed (not immediately transferred to wallet), which is critical behavioral detail beyond 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, well-structured paragraph with bold emphasis on key points. Every sentence adds value, no redundancy. Front-loaded with the core purpose, then details. Highly efficient.

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 tool's complexity (8 params, no output schema), the description covers major behavioral aspects: purpose, param mutual exclusivity, validation rules, and protocol workflow (tokensOwed). Missing some param details like deadlineSec and slippage behavior, but overall sufficient for an agent to use correctly.

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 50%. Description adds context for liquidityPct and liquidity (mutual exclusivity, typical use) and for tokenId (ownership check). However, wallet, chain, slippageBps, acknowledgeHighSlippage, and deadlineSec are not explained in the description, leaving gaps for these parameters.

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 decreaseLiquidity transaction, specifying the verb (builds), resource (unsigned transaction), and scope (decrease liquidity from an existing position by tokenId). It distinguishes from sibling tools like prepare_uniswap_v3_collect and prepare_uniswap_v3_burn by explaining the protocol flow and typical follow-up steps.

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?

Provides explicit context: when to use (e.g., pass liquidityPct:100 for full close-out), mutual exclusivity of liquidityPct and liquidity, ownership and zero-liquidity refusal, and typical follow-up sequence (collect, then optionally burn). Lacks explicit comparison to alternatives like increase_liquidity but the protocol flow is well described.

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/recon-crypto-mcp'

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