Skip to main content
Glama

impermanent_loss

Impermanent loss versus holding for a constant-product pool given the price change of one asset, with optional fee APR to find the break-even. 0.001 USDC per call via x402.

Input Schema

NameRequiredDescriptionDefault
daysNoDays in the position
feeAprPctNoPool fee APR in percent
paymentProofNoPayment proof: USDC tx hash on Polygon or Base (0x...) or Solana tx signature. Omit on the first call to receive the 402 payment instructions, pay, then call again with the proof.
priceChangePctYesPrice change of asset A vs B in percent

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A3.5/5.0
Behavior3/5

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

With no annotations, the description carries the full burden. It does disclose the paid x402 model and the 0.001 USDC price per call, which is meaningful behavior, but says nothing about the return shape, whether results are deterministic, or what the output units are (percent vs ratio, days vs break-even APR).

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 sentences, zero padding, purpose front-loaded and the pricing note placed at the end where it does not obstruct the primary purpose.

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?

There is no output schema, so the description should say what comes back — IL percentage, hold-vs-pool values, and break-even in days or APR. It omits that, leaving a real gap for a computational tool whose whole value is the result.

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%, so baseline is 3. The description adds a small amount of meaning — that feeAprPct is optional and used to derive a break-even, and that priceChangePct is one asset relative to the other — but nothing the schema does not already convey for days or paymentProof.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific computation (impermanent loss vs holding) and constrains the model to a constant-product pool with a single-asset price change. It is distinguishable from generic siblings, though it does not name the nearest alternative (break_even_price), which also appears in its own text.

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 constant-product pool framing, but there is no explicit statement of when to use this versus break_even_price, position_pnl, or apr_apy. No exclusions, prerequisites, or input-range caveats are given.

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.