Skip to main content
Glama

Agent Data Tools: Prices and DeFi

price_token

USD price of any ERC-20 token on Base, Ethereum, Arbitrum or Optimism, computed from the deepest Uniswap v3 pool against USDC or WETH, read live from the chain. Returns the pool, its fee tier, the quote-token reserve and a thin-liquidity flag. Spot price, not a time average. No pool returns 404, uncharged. Use to value a token or check a quote before a swap or payment. Costs $0.002 in USDC on Base per successful call, paid with x402.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
chainNoNetwork: base (default), eth, arb or op
addressYes0x ERC-20 token contract address

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.5/5.0
Behavior5/5

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

Beyond the annotations it discloses the data source (deepest Uniswap v3 pool, live chain read), the return payload (pool, fee tier, quote-token reserve, thin-liquidity flag), failure semantics ('No pool returns 404, uncharged'), and a concrete cost model ($0.002 USDC on Base via x402). The readOnlyHint=false is consistent with the description, since a paid x402 call moves USDC on-chain, so no contradiction arises.

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?

Five short sentences, each carrying distinct information: what, source, return shape, price semantics, failure/billing. The key scoping facts (chains, pool source, spot-not-TWAP) are front-loaded with no filler.

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?

With no output schema, the description compensates by enumerating the returned fields and the 404 failure mode, plus the payment requirement an agent must satisfy before calling. Nothing material for correct invocation is missing for a two-parameter lookup tool.

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%: 'chain' has an enum with defaults documented and 'address' is described as a 0x ERC-20 contract address. The description adds pricing context (quote tokens USDC/WETH) but no parameter-level syntax or formatting detail beyond the schema, so the baseline of 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?

States a specific verb+resource with full scope: 'USD price of any ERC-20 token' on four named chains, sourced from the deepest Uniswap v3 pool against USDC or WETH. This clearly separates it from siblings like token-info, token-report, contract-risk and the per-chain *_token-info tools. An agent can select it without opening the schema.

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?

Gives explicit positive triggers: 'Use to value a token or check a quote before a swap or payment.' It also implicitly rules out time-series needs via 'Spot price, not a time average.' It does not name which sibling to use instead (e.g. token-report for deeper analysis), so routing guidance stops one step short of a 5.

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