Skip to main content
Glama

AnalyzeBalancerLP

Analyze a 2-asset Balancer weighted-pool LP position's PnL. Decomposes impermanent loss using the weighted-pool formula where the base token's weight affects IL magnitude. Values are denominated in opp-token units per BalancerImpLoss's convention; fee income is not attributed in v1 because Balancer pools only expose vault-level fees with no per-LP attribution.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
rpc_urlYesAn Ethereum (or L2) JSON-RPC URL used to read live pool state. Required; supplied by you per call (BYO-RPC) and may carry your provider key. The endpoint stores and logs nothing — the URL is never persisted or written to logs.
chain_idNoOptional guard. If supplied and the RPC reports a different chain id, the call is rejected. Defaults to 1 (Ethereum mainnet) conceptually; omit to skip the check.
pool_typeYesWhich protocol the pool at pool_address belongs to. This tool accepts only balancer (2-asset weighted pool).
lp_init_amtYesPool shares held by this position, in human units.
block_numberNoOptional block number to pin the read to a historical block. Omit to read the latest block.
pool_addressYesOn-chain address of the pool/pair to analyze (Uniswap V2/V3 pair, Balancer weighted pool, or Curve stableswap pool). Required. Lowercase, uppercase, or checksum casing all work.
entry_opp_amtYesAmount of opp (second) token originally deposited.
entry_base_amtYesAmount of base (first) token originally deposited.
holding_period_daysNoOptional holding period in days. If supplied, real_apr is annualized from net_pnl.

TDQS

A4.2/5.0
Behavior4/5

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

With no annotations, the description carries the full burden. It discloses how IL is calculated, the unit convention, and the limitation that fee income is not attributed because Balancer only exposes vault-level fees. The rpc_url schema adds that the URL is never persisted or logged, which is meaningful behavioral context.

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 two dense sentences with no filler. Every clause contributes: pool type, IL decomposition, unit convention, fee limitation, and version. It is front-loaded and easily scannable.

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?

The tool has 9 parameters, no output schema, and no annotations, so the description must carry substantial weight. It covers purpose, IL behavior, units, and fee attribution. However, it does not describe the return values (e.g., net_pnl, real_apr) which would be helpful given the absence of an output schema.

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 coverage is 100%, so the parameters are fully described in the schema. The description adds general context about units and IL decomposition but does not directly explain individual parameters beyond what the schema already provides. Baseline 3 applies.

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 clearly states a specific verb and resource: 'Analyze a 2-asset Balancer weighted-pool LP position's PnL.' It distinguishes itself from siblings by focusing on Balancer weighted pools, IL decomposition using the weighted-pool formula, and the convention of opp-token units.

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 implies this tool is for Balancer weighted-pool LP positions and the schema enforces pool_type='balancer'. However, it does not explicitly name alternatives like AnalyzeStableswapLP for Curve pools, so the context is clear but exclusions are implicit.

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.2/5.0
Disambiguation4/5

Tools are mostly distinct by protocol and action, but AnalyzePosition and the protocol-specific Analyze*LP tools overlap in purpose, as do SimulatePriceMove and Simulate*Move. Descriptions clearly differentiate them, so an agent can select correctly with careful reading, but the generic versus specific split introduces some ambiguity.

Naming Consistency5/5

All tool names follow a consistent VerbNoun pattern (Analyze, Assess, Build, Calculate, Check, Detect, Simulate) with no mixing of conventions. The naming is uniform and predictable across the entire set.

Tool Count5/5

11 tools is well within the ideal range for a specialized LP analysis server. Each tool covers a distinct function across protocols, and none feel redundant or superfluous. The count is well-scoped for the server's purpose.

Completeness4/5

The tool set covers the full lifecycle of LP analysis: position PnL analysis, price simulations, depeg risk, slippage, pool health, rug detection, and state serialization. Minor gaps exist, such as fee attribution for Balancer and Curve pools and a generic simulate tool for all protocols, but these are protocol limitations or acceptable omissions.