Skip to main content
Glama

AssessDepegRisk

Quantify a 2-asset Curve-style Stableswap LP position's exposure to a stablecoin depeg. Computes IL at multiple depeg levels (default 2%, 5%, 10%, 20%, 50%) via the closed-form stableswap-invariant expansion, with an optional V2 constant-product benchmark at each level. Some depeg levels are physically unreachable at high A — unreachable scenarios return null on il_pct, lp_value_at_depeg, and hold_value_at_depeg; the V2 benchmark stays populated.

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 stableswap (2-asset plain Curve pool).
compare_v2NoIf true (default), each scenario reports the equivalent V2 constant-product IL at the same price deviation.
lp_init_amtYesLP tokens held, in human units. Must be > 0.
block_numberNoOptional block number to pin the read to a historical block. Omit to read the latest block.
depeg_levelsNoDepeg magnitudes as fractions in (0, 1). Default [0.02, 0.05, 0.10, 0.20, 0.50].
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.
depeg_token_nameNoOptional. Symbol of the asset assumed to depeg (e.g. 'USDC', 'DAI'). Must be one of the two tokens in the pool. If omitted, the pool's first token is used.

TDQS

A4/5.0
Behavior3/5

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

With no annotations, the description carries the full burden of behavioral disclosure. It does well by explaining the closed-form stableswap-invariant expansion, the optional V2 benchmark, and the important edge case where unreachable depeg levels return null for certain fields while the V2 benchmark remains populated. However, it does not explicitly state that the tool is read-only, nor does it mention authentication or rate-limit considerations. The schema's rpc_url comment covers privacy, but the main description omits side-effect and access-level details.

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?

Two dense, front-loaded sentences with no filler. The first sentence establishes purpose and computation; the second covers the critical edge case. Every clause earns its place, and the structure makes the description easy to scan.

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?

There is no output schema, but the description compensates by naming return fields (il_pct, lp_value_at_depeg, hold_value_at_depeg) in the null-case explanation and by specifying defaults and benchmark behavior. It still does not fully describe the output envelope (e.g., how scenarios are keyed), but for an LP risk tool with this complexity, the provided context is largely sufficient for an agent to invoke it correctly.

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 value by naming default depeg levels (2%, 5%, 10%, 20%, 50%), the optional V2 benchmark, and the null-output behavior for unreachable levels, which enriches the meaning of depeg_levels and compare_v2. But it does not add semantic detail for parameters like lp_init_amt, pool_address, or chain_id beyond what the schema already provides.

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 starts with a specific verb ('Quantify') and identifies a precise resource: a 2-asset Curve-style Stableswap LP position's exposure to stablecoin depeg. It clearly distinguishes this tool from siblings like AnalyzeStableswapLP (general analysis) and SimulateStableswapMove (price move simulation) by focusing on multi-level depeg IL with an optional V2 benchmark.

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 clearly conveys the intended context: use this when assessing IL from a stablecoin depeg on a 2-asset stableswap LP. It mentions the optional V2 comparison and default depeg levels, giving a solid sense of when it applies. However, it does not explicitly state when not to use it or name alternative tools for related but different analyses.

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.