Skip to main content
Glama

Batch token prices + trade price impact (Base and Solana DEX pools)

onchain_prices_batch

Use when a trading agent needs many token prices at once plus what a buy would really cost. Input: tokens (≤25, base:0x… or sol:, ≤10 Solana), amount_usd (default 1000). Output: per token priceUsd, confidence, pool, depth and a buy estimate: tokensOut, effectivePriceUsd, priceImpactPct (Uniswap v3 QuoterV2 / Aerodrome on Base, CLMM estimate on Orca). Cached 20 s. Example: ?tokens=base:0x4200000000000000000000000000000000000006&amount_usd=5000 Price: $0.008 USDC (Base or Solana) via x402.

Input Schema

NameRequiredDescriptionDefault
tokensYesComma-separated chain:address list, max 25 (≤10 Solana). Bad input → 400 before payment (not charged)
amount_usdNoSize of the buy to estimate, in USD (default 1000)

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 burden and does well: it discloses the 20 s cache, the quoting sources (Uniswap v3 QuoterV2 / Aerodrome, Orca CLMM estimate), and the x402 payment price. It omits failure/rate-limit behavior and what happens when a pool lacks depth, so not 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?

Dense and front-loaded: trigger, input shape, output shape, cache, all in a few clauses. The trailing example is written as a URL query string ('?tokens=...&amount_usd=5000') rather than tool arguments, which is minor noise for a tool whose params are object properties.

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?

For a 2-param tool with no output schema, the description enumerates the returned fields (priceUsd, confidence, pool, depth, tokensOut, effectivePriceUsd, priceImpactPct) and the caching and payment model. An agent has enough to decide and call 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 coverage is 100%, so both parameters are already documented, including the 25-token cap, Solana sub-limit, and default 1000. The description restates those same constraints and adds no syntax or format meaning beyond the schema, so baseline 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: batch token prices plus simulated buy cost/price impact across Base and Solana DEX pools. This clearly separates it from the single-token sibling onchain_prices without opening either 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?

'Use when a trading agent needs many token prices at once plus what a buy would really cost' gives an explicit triggering context. It implies batch-vs-single usage but never names onchain_prices as the alternative or states an exclusion for single-token lookups.

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