Skip to main content
Glama

Moltline TaxLots

Lp Position Math

lp_position_math
Read-onlyIdempotent

Impermanent loss, hold-vs-pool value and basis split for a two-asset constant-product pool. FREE.

Typical input {"deposit": {"asset_a": "ETH", "qty_a": "1", "price_a": "2000", "asset_b": "USDC", "qty_b": "2000", "price_b": "1"}, "current_prices": {"ETH": "3000", "USDC": "1"}} returns {"il_pct": "-2.02", "hold_value": "5000.00", "pool_value": "4898.98", "deposit_value": "4000.00", "basis_split": {...}}. The pool value assumes x*y=k with no fees; add fees_earned_fiat to see the net. The basis split is the deposit's fiat value at deposit, allocated by each side's share, which is the arithmetic a lot engine needs if the LP position is treated as one asset. Use for DeFi position reviews. Not a determination of whether the deposit is a taxable exchange. Errors: on invalid, missing, or malformed input this tool never raises a protocol error — it returns {"error": ""} (for example {"error": "deposit and current_prices must be objects"}). Every call is read-only and idempotent, so after correcting the input it is always safe to retry.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
depositYesasset_a, qty_a, price_a, asset_b, qty_b, price_b at the time of deposit.
current_pricesYes{asset: price} for both assets now.
fees_earned_fiatNofees accrued to the position, in fiat.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. First observed

TDQS

A4.6/5.0
Behavior5/5

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

Annotations already declare readOnlyHint, idempotentHint, and destructiveHint. The description adds meaningful behavioral details beyond those: it never raises protocol errors and instead returns an error object with a fix, and retrying after correcting input is always safe. This is exactly the kind of runtime behavior an agent needs to know.

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 description is front-loaded with the core purpose and then gives a compact example and error behavior. It is longer than average, but most sentences earn their place. The standalone 'FREE.' is minor noise, so it does not merit a 5.

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?

Given a rich input schema, full schema coverage, annotations, a nested-object example, output example, and explicit error-behavior guidance, the description is complete for an agent to select and invoke the tool correctly. The presence of an output schema also means the description need not enumerate return fields.

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 schema already documents deposit, current_prices, and fees_earned_fiat. The description adds value by explaining that fees_earned_fiat adjusts the pool value to a net figure, and by providing a concrete typical input/output example that clarifies how the nested deposit object maps to values.

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 and resource: it computes impermanent loss, hold-vs-pool value, and basis split for a two-asset constant-product pool. It also distinguishes this from tax-determination work by saying 'Not a determination of whether the deposit is a taxable exchange', which differentiates it from the sibling lot/tax tools.

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?

The description gives a clear when-to-use signal: 'Use for DeFi position reviews.' It also gives a when-not-to-use signal by clarifying it is not a taxable-exchange determination. However, it does not name or route to a specific alternative sibling tool, so it stops short of full alternative 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.

TDQS

A4.6/5.0
Disambiguation5/5

Each of the eight tools targets a distinct stage or analysis: import normalization, ledger validation, transfer pairing, lot building, Form 8949 formatting, broker-form reconciliation, wash-sale checking, and LP math. No two tools could be reasonably confused for one another.

Naming Consistency3/5

Names are all lowercase snake_case and readable, but they mix verb_object forms like parse_transactions, match_transfers, and build_lots with noun-first compound forms like ledger_lint, lp_position_math, and wash_window_check. The convention is not uniform enough to be 'mostly consistent,' though it is still predictable from the domain.

Tool Count5/5

Eight tools is a well-scoped size for a crypto tax-lot workflow; each tool covers a necessary step without redundant helpers. The count feels neither thin nor bloated.

Completeness5/5

The toolset covers the full pipeline from transaction import through linting, transfer matching, lot building, tax form row generation, 1099-DA reconciliation, and wash-sale review. The standalone LP math tool addresses a relevant adjacent need, and there are no obvious dead ends.

Resources