Skip to main content
Glama

LP Pool Check

Estimate fees versus impermanent loss

estimate_lp
Read-onlyIdempotent

Estimate fees versus impermanent loss. Use this when the user gives a price range or a later price, a holding period, and a fee APR, and wants to know whether fees cover impermanent loss, gas, and exit cost. Pass price_now, holding_days, and fee_apr_percent. Pass price_lower and price_upper for a concentrated range, or omit them for the full-range formula. Optionally pass price_later, capital_usd, gas_usd, and exit_cost_usd. Returns the formula, the fee fraction, the IL fraction, whether fees cover IL and the costs you passed, and break-even prices from a sample. It does not look up gas or recommend a position. Not financial advice.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
gas_usdNoGas you expect to pay. Not looked up
price_nowYesCurrent price, quote per base
capital_usdNoPosition size, so gas and exit cost can be turned into a fraction of the position
price_laterNoA later price to score. Omit to get break-even prices and the range edges only
price_lowerNoLower bound of a concentrated range. Omit, with price_upper, for the full-range formula
price_upperNoUpper bound of a concentrated range
holding_daysYesHow many days the fee APR is applied
exit_cost_usdNoOther exit cost. Not looked up
fee_apr_percentYesAnnualized fee APR in percent, such as the 1-day fee APR from check_pool

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
noticeYes
statusYes
formulaYes
gas_usdNo
assumptionsYes
fee_fractionYes
in_range_nowNo
cost_fractionNo
exit_cost_usdNo
sampled_edgesNo
fee_apr_formulaYes
break_even_pricesYes
il_fraction_at_laterNo
fees_cover_il_and_costsYes
net_versus_holding_at_laterNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.6/5.0
Behavior4/5

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

Annotations already cover safety (readOnly, idempotent, non-destructive), so the bar is lower; the description still adds substantive behavior: it enumerates what is returned (formula, fee fraction, IL fraction, coverage verdict, break-even prices), scopes itself ('does not look up gas'), and carries a 'Not financial advice' caveat. Minor tension with openWorldHint=true, since the description emphasizes that no external lookup occurs, but this is a clarification rather than a contradiction.

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?

Front-loaded with the purpose and the use condition, and each sentence carries information. It is slightly dense — the required/optional parameter inventory and return enumeration overlap with what the schema and output schema already express — but nothing is wasted or redundant enough to penalize heavily.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With an output schema present, return-value explanation is a bonus rather than a necessity, yet the description still covers inputs, branching logic, exclusions, and caveats. An agent has everything needed to decide and invoke correctly.

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 the baseline is 3; the description goes beyond it by grouping parameters (required trio vs optional trio), explaining the conditional pair price_lower/price_upper, and tying fee_apr_percent to its source ('such as the 1-day fee APR from check_pool') and capital_usd to its purpose via the gas/exit-cost fraction.

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+resource ('Estimate fees versus impermanent loss') and makes the comparison target explicit — fees covering IL, gas, and exit cost. It is clearly distinguishable from siblings like check_pool (which supplies the fee APR) or find_active_pools.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives an explicit trigger ('when the user gives a price range or a later price, a holding period, and a fee APR'), names the required inputs, and states the branching condition: pass price_lower/price_upper for a concentrated range, omit for full-range. It also declares exclusions ('does not look up gas or recommend a position').

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