Skip to main content
Glama

BuildStateTwin

Read a pool's on-chain state once and return it as a serialized State Twin (JSON): the protocol-specific snapshot plus a content_hash, in the wire form a client rehydrates locally. Use this to pull a single managed-RPC twin, then run any number of counterfactuals (price moves, IL, slippage) client-side, off this server. Covers Uniswap V2/V3, Balancer 2-asset weighted, and Curve 2-asset plain stableswap pools. The endpoint stores and logs nothing — your rpc_url is never persisted.

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. Omit to skip the check.
lwr_tickNouniswap_v3 only — lower tick of the position range to snapshot. Omit for the pool's full active-liquidity range. Ignored for other pool types.
upr_tickNouniswap_v3 only — upper tick of the position range to snapshot. Omit for the pool's full active-liquidity range. Ignored for other pool types.
pool_typeYesWhich protocol the pool at pool_address belongs to: 'uniswap_v2' | 'uniswap_v3' | 'balancer' (2-asset weighted) | 'stableswap' (2-asset plain Curve). All four are supported — this tool spans every snapshot type.
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 snapshot. Required. Lowercase, uppercase, or checksum casing all work.

TDQS

A4.2/5.0
Behavior4/5

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

With no annotations provided, the description carries the full transparency burden. It explicitly discloses that 'The endpoint stores and logs nothing — your rpc_url is never persisted', a meaningful behavioral trait for a tool handling potentially sensitive RPC URLs. It also implies read-only semantics via 'Read', though it doesn't discuss rate limits or error behavior.

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 three sentences long, each earning its place: the first states the core function and output, the second gives usage context, and the third adds a privacy guarantee. It's front-loaded and has no filler.

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 is moderately complex (7 parameters, no output schema), but the rich schema descriptions cover the parameters. The description adds the output format components (protocol-specific snapshot plus content_hash), the supported pool types, and the no-logging behavior. It could be more explicit about the exact JSON return structure, but overall it's sufficient for selection and invocation.

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%, with each parameter individually described in detail. The description itself does not add parameter-level semantics beyond what the schema already covers, so it meets the baseline of 3 without needing to compensate.

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 opens with 'Read a pool's on-chain state once and return it as a serialized State Twin (JSON)', clearly stating the verb ('read') and resource ('pool's on-chain state') and the output format. It distinguishes itself from sibling analysis tools by positioning itself as a data-pulling step for client-side counterfactuals, which sets it apart from the analysis-focused siblings.

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 advises to 'Use this to pull a single managed-RPC twin, then run any number of counterfactuals... client-side', providing clear context on when to choose this tool. It doesn't explicitly name alternatives or state when not to use it, but the context is specific enough to guide usage.

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.