Skip to main content
Glama

Token prices from onchain DEX pools (Base and Solana), with pool, depth and confidence

onchain_prices

Use when an agent needs a token's USD price without a third-party price feed. Input: tokens (up to 10, base:0x… or sol:). Output: per token priceUsd, confidence, the pool used (Uniswap v3 / Aerodrome on Base, Orca Whirlpool on Solana; fee tier, depth in USD), path (direct USDC or via WETH/SOL), warnings; no price below $1,000 depth. Spot, not TWAP. Example: ?tokens=base:0x940181a94A35A4569E4529A3CDfB74e38FD98631 Price: $0.003 USDC (Base or Solana) via x402.

Input Schema

NameRequiredDescriptionDefault
tokensYesComma-separated chain:address list, max 10 (base:0x… ERC-20, sol:<mint> base58). Bad input → 400 before payment (not charged)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.2/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does so well: it discloses supported chains, the pool venues and routing used, a depth threshold, that results are spot and not TWAP, and that bad input returns 400 before payment. Cost and payment mechanics via x402 are also stated. It omits rate limits, freshness/latency, and caching, which keeps it off a 5.

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-loads the trigger, then uses labeled Input/Output blocks followed by qualification (depth floor, spot-not-TWAP) and price. Dense but every line earns its place; the trailing example and pricing sentence are slightly tacked on rather than integrated.

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, and the description fully compensates by enumerating return fields: per-token priceUsd, confidence, pool with fee tier and USD depth, path (direct USDC or via WETH/SOL), and warnings. For a single-parameter read tool this is complete enough to call correctly on the first attempt.

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% and the single parameter is already documented (comma-separated chain:address, max 10, base:0x…/sol:<mint> base58, 400 on bad input). The description restates that format and adds only a concrete example query, so it adds marginal value over the schema — baseline 3.

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: a token's USD price sourced directly from onchain DEX pools on Base and Solana, naming the exact venues (Uniswap v3 / Aerodrome / Orca Whirlpool). This cleanly separates it from feed-based siblings like fx_rates, llm_model_prices, and the token_info/risk tools.

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?

Explicit trigger: "Use when an agent needs a token's USD price without a third-party price feed," plus a hard usability boundary ("no price below $1,000 depth") that tells the agent when the tool will not answer. It does not name alternative siblings (e.g. base_token_info, fx_rates) or say when to prefer them, so it stops 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