Skip to main content
Glama

chain_twap

Read-only

Uniswap v3 TWAP oracle price — Manipulation-resistant time-weighted average price from any Uniswap v3-style pool (Uniswap, Sushi, Pancake v3) on Ethereum, Base, Arbitrum, Optimism or Polygon via observe(): TWAP tick and price both ways with token symbols/decimals, spot price, spot-vs-TWAP gap and a CONSISTENT/SPOT_DRIFTING/SPOT_FAR_FROM_TWAP signal, fee tier and oracle cardinality. Params: pool, chain; optional seconds (10-604800, default 1800). 422 when the pool oracle history is shorter than the window. Price: $0.003 USDC (Base, via x402).

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "pool": "<pool>",
      "chain": "<chain>"
    },
    "name": "chain_twap"
  }
}

Input Schema

NameRequiredDescriptionDefault
poolYes0x88e6A0c2dDD26FEEb64F039a2c41296FcB3f5640
chainYesethereum

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.4/5.0
Behavior5/5

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

Annotations already cover read-only, non-destructive and open-world, and the description adds substantial context beyond them: the observe() mechanism, the enumerated return fields (TWAP tick/price both ways, spot gap, signal, fee tier, cardinality) and the 422 failure when oracle history is shorter than the window. It also discloses a per-call cost of $0.003 USDC via x402, which an agent genuinely needs to know before calling.

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?

Front-loaded with the resource and mechanism, then params, then the failure mode and price — a sensible order with little filler. It is dense and slash-separated in places, but nearly every clause carries actionable information.

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?

For a two-parameter read tool with no output schema, the description covers mechanism, returned values, error behavior and cost, which is more than adequate. The one gap is the seconds parameter being described but absent from the input schema, which could confuse an agent about whether it can be passed.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100% but the schema descriptions are only example values, so the description carries the real semantics: pool accepts any Uniswap v3-style pool, chain spans five named networks, and seconds is documented with a range (10-604800) and default (1800). Note that seconds does not appear in the schema properties at all, a mismatch worth flagging even though the added meaning is valuable.

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?

States a specific verb+resource (returns a Uniswap v3 TWAP oracle price via observe()) and names the exact pool types and chains covered. It clearly separates itself from spot-quote siblings like chain_dex_pool by emphasizing manipulation resistance and the spot-vs-TWAP comparison.

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 rather than stated: 'manipulation-resistant' and the CONSISTENT/SPOT_DRIFTING/SPOT_FAR_FROM_TWAP signal hint that this should be preferred over a spot read, but no alternative tool is named and no explicit when-not condition is given. The 422 caveat is the only stated failure condition.

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