Skip to main content
Glama

chain_token_price

Read-only

On-chain token price in USD — USD price of any ERC-20 straight from Uniswap v3 pools (QuoterV2 eth_call vs USDC, direct and via WETH) on base, ethereum, arbitrum, optimism or polygon - no off-chain price API. Also simulates selling 1000 USD worth to report price impact and a liquidity grade (DEEP/MODERATE/THIN/VERY_THIN). token = symbol or contract address. 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": {
      "chain": "<chain>",
      "token": "<token>"
    },
    "name": "chain_token_price"
  }
}

Input Schema

NameRequiredDescriptionDefault
chainYesbase
tokenYesWETH

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.6/5.0
Behavior5/5

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

Goes well past the readOnly/openWorld annotations: it discloses the exact mechanism (QuoterV2 eth_call against USDC, direct and via WETH), that a 1000 USD sell is simulated to derive price impact, and that a DEEP/MODERATE/THIN/VERY_THIN liquidity grade is returned. It also flags the paid x402 cost of $0.003 USDC, which is material behavior an agent must 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?

The primary output (USD price) is front-loaded, followed by method, extra outputs, parameter hints, and cost — a sensible ordering with no filler sentences. The dash-heavy packing makes it dense to parse, but every clause carries information.

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, yet the description enumerates what comes back (USD price, price impact, liquidity grade), how it is computed, which chains are valid, and the call cost. For a two-parameter read tool, an agent has everything needed to invoke it correctly.

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

Parameters4/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 bare examples ('base', 'WETH'), so the description adds real meaning by stating that token accepts either a symbol or a contract address and by enumerating the five supported chains. It still does not say whether chain names are case-sensitive or whether an unsupported token returns an error versus null.

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 resource and result: 'On-chain token price in USD' for any ERC-20, computed from Uniswap v3 pools (QuoterV2 eth_call vs USDC, direct and via WETH) across five named chains. The 'no off-chain price API' clause implicitly separates it from feed-style siblings like chain_price_feed, so an agent can pick it without opening a 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 clear context for use: pricing ERC-20 tokens on base/ethereum/arbitrum/optimism/polygon from on-chain pools, not an off-chain oracle. It lacks an explicit 'use X instead when...' exclusion (e.g., for native assets or non-Uniswap venues), so guidance is strong but not fully routing.

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