Skip to main content
Glama

x402 agent toolkit: service finder, payment safety, Solana & web tools

Impermanent loss calculator

impermanent_loss
Read-onlyIdempotent

LP value vs holding after a price move: full-range (Uniswap v2) and concentrated range (v3, lower/upper) impermanent loss. Free: 10 calls/day; then $0.001/call via x402 (MCP params._meta["x402/payment"] or HTTP) or X-API-Key credits. [served by tools.moneytools.dev]

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "impermanent_loss"
  }
}

Input Schema

NameRequiredDescriptionDefault
lowerNov3 range lower
upperNov3 range upper
newPriceNocurrent price
entryPriceNoprice at deposit
priceRatioNoor new/entry ratio

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.9/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint, destructiveHint=false and openWorldHint, so the safety profile is covered. The description adds genuinely non-structured behavior: a hard quota (10 calls/day), per-call pricing ($0.001) after that, and the exact payment mechanisms (params._meta['x402/payment'] or X-API-Key credits) — precisely the operational context an agent needs before calling. It stops short of error/failure behavior, but the quota and auth disclosure is substantial.

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?

The purpose is front-loaded in the first sentence, followed by the commercial/access terms. No filler sentences, though the payment parenthetical with the _meta key is dense; it earns its place but could be tightened.

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?

An output schema exists, so return values need not be explained, and annotations carry the read-only safety profile. Given a zero-required-param calculator, the description covers what to compute, the two loss models, and access costs; only the mutual exclusivity of the price inputs and numeric formatting are unaddressed.

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 schema already documents all five parameters and the baseline of 3 applies. The description adds only the mode framing that ties 'lower'/'upper' to the v3 case; it does not clarify the entryPrice+newPrice versus priceRatio choice or units/precision, which is where real ambiguity remains.

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 first clause names the exact computation — 'LP value vs holding after a price move' — and immediately scopes it to the two supported models ('full-range (Uniswap v2)' and 'concentrated range (v3, lower/upper)'). An agent knows precisely what output domain this tool occupies and can distinguish it from price/APR siblings.

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 computation description ('after a price move') and the v3 variant names the lower/upper bounds, hinting which params apply to which mode. However there is no explicit when-to-use versus alternatives (e.g., apr_apy, dex_price) and no stated preconditions such as both entryPrice and newPrice being needed unless priceRatio is supplied.

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