Skip to main content
Glama

crypto_impermanent-loss

Read-onlyIdempotent

Calculate impermanent loss for Uniswap v2 or v3 liquidity positions by providing initial and current price ratios. Returns loss percentage, hold vs LP value, and breakeven ratios.

Instructions

Impermanent loss calculator for Uniswap v2/v3 AMM positions.

Use when calculating impermanent loss for a liquidity provider position. Provide initial prices and current prices for two tokens. Returns: impermanent loss percentage, hold value vs LP value, and breakeven price ratios.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
amm_typeNoAMM type: v2 (full range) or v3 (concentrated)v2
lower_tickNoLower price bound (v3 only)
upper_tickNoUpper price bound (v3 only)
initial_investmentNoInitial investment value in USD
current_price_ratioYesCurrent price ratio of token A to token B
initial_price_ratioNoInitial price ratio of token A to token B
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint, destructiveHint. Description adds output details (percentage, hold vs LP value, breakeven ratios) that go beyond annotations, improving transparency. No contradictions.

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?

Two highly focused sentences with no wasted words. Front-loaded with core purpose, then usage and output summary. Every sentence earns its place.

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?

Description lists three return values, which is good for a no-output-schema tool. However, it oversimplifies v3 usage by not mentioning lower/upper tick parameters explicitly. Could be more complete on parameter-specific constraints.

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 coverage is 100%, so baseline is 3. Description adds context by specifying 'provide initial prices and current prices' and the v2/v3 distinction, which maps to parameters. Adds moderate value beyond schema.

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?

Description clearly states it is an impermanent loss calculator for Uniswap v2/v3, distinguishing it from siblings like backtest_strategy or crypto_dex-slippage. Verb+resource is specific.

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?

Explicitly says 'Use when calculating impermanent loss for a liquidity provider position', providing clear context. Does not list alternatives or when-not-to-use, but the scope is well-defined and distinct from other tools.

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/QuantOracledev/quantoracle'

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