Skip to main content
Glama

TradingCalc MCP: Options, Forex, Risk Stats, Prediction Markets, On-Chain & Crypto Futures

Impermanent Loss (Live)

workflow.run_impermanent_loss_live
Read-only

Live variant of workflow.run_impermanent_loss: fetches each token's current live USD price (Solana or any of 5 EVM chains) and derives currentPrice as their ratio, instead of it being supplied manually. entryPrice stays a manual, historical input (a fact the caller must supply, not something a live quote should overwrite), same convention as every other live-capable tool in this product. Edge cases: same input rules as workflow.run_impermanent_loss, except currentPrice is derived from the live USD prices of the two tokens (each on solana, ethereum, base, bsc, arbitrum or polygon); if either price cannot be read, routable is false with an error and no figure is returned; entryPrice stays manual. Not covered: price moves inside the period, rebalancing, gas, tax, and thinly traded tokens whose quoted price is unreliable. Use when the caller has the pool's two token addresses but doesn't already know the current price ratio. Returns the same fields as workflow.run_impermanent_loss, plus currentPrice, baseSymbol, quoteSymbol, routable (false + error if either token's price can't be resolved).

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "entryPrice": "<entryPrice>",
      "baseMint": "<baseMint>",
      "quoteMint": "<quoteMint>"
    },
    "name": "workflow.run_impermanent_loss_live"
  }
}

Input Schema

NameRequiredDescriptionDefault
modeNoDefault full_range.
baseMintYesAddress of the base token
baseChainNoChain of the base (volatile) token. Default solana.
quoteMintYesAddress of the quote token
entryPriceYesBase token's price in quote-token terms when liquidity was deposited (manual - a historical fact)
lowerPriceNoRange lower bound - required for concentrated mode
quoteChainNoChain of the quote token. Default solana.
upperPriceNoRange upper bound - required for concentrated mode
feesEarnedUsdNoOptional trading fees earned so far in USD (default 0)
depositValueUsdNoOptional: USD value deposited at entry

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.5/5.0
Behavior5/5

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

Goes well beyond the readOnly/openWorld annotations by disclosing the failure contract ('if either price cannot be read, routable is false with an error and no figure is returned'), the immutability of entryPrice, and an explicit Not-covered list (price moves inside the period, rebalancing, gas, tax, unreliable thin-market quotes). That is exactly the behavioral context the caller needs about a live external fetch.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loads the live-vs-manual distinction well, but the entryPrice-is-manual point is restated three separate times ('a fact the caller must supply', 'same convention as every other live-capable tool', 'entryPrice stays manual'), and the edge-case paragraph largely repeats the lead. Tightening would preserve all signal at half the length.

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?

For a 10-parameter, no-output-schema tool, the description covers purpose, selection, derived-vs-manual inputs, the error path, the returned fields (including currentPrice, baseSymbol, quoteSymbol, routable), and scope exclusions. An agent can call it and interpret both success and failure without additional information.

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, but the description adds real meaning: it explains why entryPrice stays manual (a historical fact a live quote must not overwrite) and clarifies that baseChain/quoteChain govern which of the six chains each live price is read from. It does not clarify mode/lower/upper-price interactions beyond what the schema says, keeping it below a 5.

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?

Opens with a precise verb+resource framing: 'Live variant of workflow.run_impermanent_loss' that 'derives currentPrice as their ratio' from live USD prices. The distinction from the manual sibling is stated in the first sentence, so an agent can route between them without opening either schema.

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?

Gives an explicit selection condition: 'Use when the caller has the pool's two token addresses but doesn't already know the current price ratio,' which implicitly routes agents holding a known ratio to the non-live sibling. It lacks an explicit 'use workflow.run_impermanent_loss instead when...' sentence and says nothing about rate limits or call cost for a live-fetch tool, so it stops just short of full routing guidance.

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.