Skip to main content
Glama

DeFAI Intent Solver, Yield Optimizer & Kelly Execution Router MCP

Calculate Uniswap V2/V3 Concentrated Liquidity Impermanent Loss & Fee Break-Even

calculate_concentrated_lp_impermanent_loss
Read-onlyIdempotent

Computes exact V2 full-range and V3 concentrated-liquidity impermanent loss (% and USD) vs HODL and calculates exact days of swap fee APR needed to break even.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "calculate_concentrated_lp_impermanent_loss"
  }
}

Input Schema

NameRequiredDescriptionDefault
depositUsdNoTotal LP deposit value in USD (default 5000)
poolFeeAprPctNoEstimated pool swap fee APR % (default 28)
priceChangePctNoAsset relative price change % (e.g. 35 or -30)
concentrationFactorNo1.0 for V2 full-range, 2.0-5.0 for concentrated V3 range

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.8/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true, idempotentHint=true, destructiveHint=false and openWorldHint=true, so the safety profile is covered. The description adds the computational semantics (IL measured against HODL, break-even expressed in days), but says nothing about model assumptions, how defaults are applied, or that results are deterministic estimates rather than market data.

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?

A single front-loaded sentence that names the outputs first and the second calculation second, with no filler or restatement of the title. Every clause carries distinct information.

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?

With four optional, fully documented parameters and no output schema, the description covers the essentials by stating what is returned (IL in % and USD, break-even days). It falls slightly short on how the two results relate and on assumptions behind the fee-APR model, but nothing critical for correct invocation is missing.

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%, including the important clarification that concentrationFactor 1.0 means V2 full-range and 2.0-5.0 means a V3 range. The description adds no parameter-level detail beyond that (e.g. how poolFeeAprPct interacts with break-even days), so the schema does the heavy lifting and the baseline 3 applies.

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 names a specific computation (impermanent loss % and USD vs HODL) and a second output (days of swap fee APR to break even), scoped explicitly to V2 full-range and V3 concentrated liquidity. That is enough for an agent to separate it from siblings like calculate_perp_liquidation_and_dca or compare_pendle_fixed_vs_funding without opening the 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?

Usage is implied by the stated computation rather than spelled out: nothing says when to prefer this over another yield/IL tool, nor what prerequisites (price change input, known fee APR) are needed. An agent can infer intent from the domain vocabulary, but there is no explicit when/when-not guidance.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.