Skip to main content
Glama

Impermanent Loss Calculator

crypto_impermanent_loss

Compute impermanent loss for a 50/50 constant-product AMM position at any relative price move, with a reference table of common moves. Deterministic closed-form — the exact divergence number an LP should compare against farming rewards. Use this when an agent needs to aMM divergence loss for any price move. x402 price $0.01/call (USDC, eip155:8453).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
priceChangePctYesHow much asset A moved vs B: 100 = 2×, -50 = half

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A3.9/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does disclose meaningful traits beyond the schema: deterministic closed-form computation, a reference-table output, and pricing (x402 $0.01/call in USDC on eip155:8453). Since it is a pure computation there are no side effects to warn about; only the shape of the returned reference table is left unstated.

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?

Efficiently front-loaded: what it computes, then accuracy/use context, then agent guidance and price. Slightly penalized for the garbled 'needs to aMM divergence loss' clause, which costs a reader a pass 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?

For a one-parameter calculator with no output schema, the description is nearly sufficient: it names the formula class, the assumption (50/50 constant product), and the reference-table return. It could state the output fields explicitly, but nothing required to invoke it correctly 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 coverage is 100% for the single parameter, including the 100 = 2x / -50 = half convention, so the baseline is 3. The description's phrase 'at any relative price move' echoes rather than extends the schema, adding no extra format or range guidance.

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?

States a specific verb (compute) and resource (impermanent loss) scoped to a 50/50 constant-product AMM at any relative price move, which no sibling calculator covers. An agent can distinguish it from nearby tools like crypto_apr_apy or crypto_yield_pools without opening a 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?

The line 'Use this when an agent needs to aMM divergence loss for any price move' restates the purpose rather than giving decision criteria, and it is grammatically broken. There is a real use-case hint ('the exact divergence number an LP should compare against farming rewards') but no explicit when-not or named alternative, so guidance is only implied.

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.

Resources