Skip to main content
Glama
jim-agent

NEAR DeFi Dashboard

by jim-agent

calculate_impermanent_loss

Calculate impermanent loss for a liquidity provider position by specifying token pair, expected price change, and optional initial value to see estimated USD impact.

Instructions

Calculate impermanent loss for liquidity provider positions

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
token_aYesFirst token in LP pair
token_bYesSecond token in LP pair
price_change_pctYesPercentage price change of token_a relative to token_b (e.g., 50 for 50% increase)
initial_value_usdNoInitial position value in USD (optional)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A3.5/5.0
Behavior2/5

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

No annotations are provided, so the description must carry the full burden of behavioral disclosure. 'Calculate' implies a non-mutating operation, but the description does not state output format, assumptions, limitations, or whether it returns a percentage, dollar amount, or both.

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?

The description is a single concise, front-loaded sentence with no redundant or filler content. Every word contributes to identifying the tool's 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?

The description plus fully documented schema is adequate for basic invocation, but the lack of any output schema or annotation coverage leaves ambiguity about the return value and any calculation assumptions. More context about what the result represents would improve completeness.

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%, so the baseline is 3. The description adds no parameter-level meaning beyond what the schema already provides, but the schema is sufficiently self-documenting.

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 states a specific verb ('Calculate'), a clear resource ('impermanent loss'), and scopes it to 'liquidity provider positions.' This is distinct from the sibling tools, which cover yields, staking, swaps, and lending rates.

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 phrase 'for liquidity provider positions' implies when the tool is relevant, but it does not explicitly explain when to choose this tool over alternatives, state exclusions, or provide context such as pool types or required market conditions.

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