Skip to main content
Glama

Agent Data Tools: Prices and DeFi

Token USD price from Uniswap v3 pools

price_token
Read-only

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. Example: address=0xcbB7C0000aB88B473b1f5aFd9ef808440eed33Bf, chain=base. Price $0.003/call via x402 USDC or a card key (/credits), first 25 free; failed calls free. Reads or computes only and changes nothing; each call is charged, so repeats are not free.

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.1/5.0
Behavior5/5

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

Annotations already cover readOnly/destructive/openWorld, but the description goes well beyond them: spot price not a time average, 404 with no charge when no pool exists, thin-liquidity flag returned, and detailed billing ($0.003/call, first 25 free, failed calls free, repeats not free). This explains the non-idempotent hint operationally and is genuinely useful pre-call context.

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?

Content is front-loaded—price/mechanism first, then output shape, then caveats, then usage and billing—and nearly every sentence carries information. The pricing and billing clause is somewhat dense and could be tightened, but it is not 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?

There is no output schema, so the description must describe returns—and it does (pool, fee tier, quote-token reserve, thin-liquidity flag), along with failure behavior (404, uncharged) and billing. An agent has everything needed to call and interpret this tool 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% and the enum for `chain` is documented in the schema, so the schema carries the parameter burden. The description's example (address=0x..., chain=base) adds a small amount of format guidance but no semantics beyond what the schema states; baseline 3 applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a specific verb+resource—USD price of an ERC-20 token—and pins down the mechanism (deepest Uniswap v3 pool vs USDC/WETH, read live) and the supported chains. It is clear on its own, but it never distinguishes itself from the sibling tool `price_tokens`, which sounds nearly identical and would plausibly be confused with it.

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?

It gives concrete usage context: 'Use to value a token or check a quote before a swap or payment,' plus a worked example with address and chain. There is no explicit when-not or alternative routing (e.g., vs `price_tokens` or `btc_price` for BTC), which keeps it 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.