Skip to main content
Glama

Agent Data Tools: Prices and DeFi

Crypto price and token price: USD price of a token from Uniswap v3 pools

price_token
Read-only

Token price in USD for a crypto token by symbol, coin name or CoinGecko id from a built-in list of main tokens (ETH, BTC, USDC, AERO, ARB, OP, LINK, PEPE…) or any ERC-20 0x address on Base, Ethereum, Arbitrum or Optimism, from the deepest Uniswap v3 pool against USDC or WETH, read live. Returns pool, fee tier, reserve and a thin-liquidity flag. Spot price; no pool is 422, uncharged. Use to value a token or check a quote before a swap or payment. Example: symbol=ETH. Price $0.002/call via x402 USDC or a card key (/credits), first 10 free; failed calls free. Reads or computes only and changes nothing; each call is charged, so repeats are not free.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "price_token"
  }
}

Input Schema

NameRequiredDescriptionDefault
chainNoNetwork: base (default), eth, arb, op or polygon
symbolNoTicker such as ETH, BTC, USDC, AERO, ARB, OP or LINK. Send symbol or address, one of the two (ETH and BTC mean the wrapped tokens; an HTTP call with no input at all answers for BTC)
addressNo0x ERC-20 token contract address, sent instead of symbol (when both are sent, the address is priced). WETH on Base is 0x4200000000000000000000000000000000000006

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • changedInput schema / properties / chain / description
      Previous value: -"Network: base (default), eth, arb or op"New value: +"Network: base (default), eth, arb, op or polygon"
    • changedInput schema / properties / chain / enum
      Previous value: -[
      -  "base",
      -  "eth",
      -  "arb",
      -  "op"
      -]New value: +[
      +  "base",
      +  "eth",
      +  "arb",
      +  "op",
      +  "polygon"
      +]
  2. Changed2 schema fields changed
    • changedInput schema / properties / address / description
      Previous value: -"0x ERC-20 token contract address (instead of symbol)"New value: +"0x ERC-20 token contract address, sent instead of symbol (when both are sent, the address is priced). WETH on Base is 0x4200000000000000000000000000000000000006"
    • changedInput schema / properties / symbol / description
      Previous value: -"Ticker such as ETH, BTC, USDC, AERO, ARB, OP or LINK (instead of address; ETH and BTC mean the wrapped tokens; an HTTP call with no input at all answers for BTC)"New value: +"Ticker such as ETH, BTC, USDC, AERO, ARB, OP or LINK. Send symbol or address, one of the two (ETH and BTC mean the wrapped tokens; an HTTP call with no input at all answers for BTC)"
  3. Changed1 schema field changed
    • changedInput schema / properties / symbol / description
      Previous value: -"Ticker such as ETH, BTC, USDC, AERO, ARB, OP or LINK (instead of address; ETH and BTC mean the wrapped tokens)"New value: +"Ticker such as ETH, BTC, USDC, AERO, ARB, OP or LINK (instead of address; ETH and BTC mean the wrapped tokens; an HTTP call with no input at all answers for BTC)"
  4. Changed3 schema fields changed
    • changedInput schema / properties / address / description
      Previous value: -"0x ERC-20 token contract address"New value: +"0x ERC-20 token contract address (instead of symbol)"
    • addedInput schema / properties / symbol
      Added value: +{
      +  "description": "Ticker such as ETH, BTC, USDC, AERO, ARB, OP or LINK (instead of address; ETH and BTC mean the wrapped tokens)",
      +  "type": "string"
      +}
    • removedInput schema / required
      Removed value: -[
      -  "address"
      -]
  5. First observed

TDQS

A3.9/5.0
Behavior3/5

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

Adds real behavioral context beyond the annotations: the return shape (pool, fee tier, reserve, thin-liquidity flag), the 422-on-no-pool case being uncharged, and the per-call pricing model that explains why idempotentHint is false. It also confirms the read-only claim ('reads or computes only and changes nothing'), consistent with readOnlyHint/destructiveHint. The pricing and charging prose is dense and partly self-duplicating ('each call is charged, so repeats are not free' restates '$0.002/call'), which blunts the added value.

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?

Purpose and source are front-loaded in the first clause, and the returns/error info follows logically. However, the pricing sentence is a run-on ('first 10 free; failed calls free... each call is charged, so repeats are not free') with redundant wording, and 'no pool is 422, uncharged' is terse to the point of being cryptic.

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 3-parameter lookup with no output schema, the description covers source data, supported chains, return fields, the no-pool failure mode, and cost per call, which is nearly everything an agent needs. The only gaps are the unresolved precedence between symbol/coin name/CoinGecko id and the meaning of the thin-liquidity flag.

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 coverage is 100%, so chain, symbol, and address are already fully documented, including the address-beats-symbol precedence and the WETH example. The description contributes mostly by noting coin name and CoinGecko id are also acceptable for symbol, a genuine addition the schema does not state, but it leaves precedence among those forms unclear.

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 and resource ('Token price in USD for a crypto token') and pins down both the resolution method (symbol, coin name, CoinGecko id, or 0x ERC-20 address) and the price source (deepest Uniswap v3 pool vs USDC or WETH on Base, Ethereum, Arbitrum, Optimism). That level of mechanism detail separates it from generic price siblings like crypto_price or price_tokens without needing to name them.

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 a concrete when-to-use: 'Use to value a token or check a quote before a swap or payment,' plus an example call (symbol=ETH). It does not name an alternative tool or state when-not to use it, so it stops short of full routing guidance.

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