Skip to main content
Glama

Best Price

best_price
Read-only

Best-price router: queries several independent gas-price sources in parallel, returns the cheapest quote and charges a configurable share of the savings (average - best) as commission. Response includes the full breakdown (best_price, average_price, savings_gross, provision, user_pays) for Base, Ethereum, Arbitrum, Optimism and Polygon. No API key. Pay per call with USDC or USDT on Base via x402. 3 free calls per wallet.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
chainNobase | ethereum | arbitrum | optimism | polygon (default base).base
walletNoYour EVM wallet address (0x...). Unlocks the free tier (3 free calls per wallet).
api_keyNoOptional AMR enterprise API key.
x_paymentNoOptional signed x402 payment payload (base64 JSON) for USDC/USDT on Base.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
chainYes
tokenNoToken actually used for payment (USDC, USDT or FREE).USDC
sourceYesSource that produced the cheapest quote.
routingYesHow the request was routed (provider, fallback, cache, latency).
cost_usdcYesPrice charged in stablecoin units (USDC/USDT 1:1); 0 on the free tier.
provisionYesCommission charged on the savings (USD).
user_paysYesbest_price + provision (USD).
best_priceYesCheapest quote across all sources (USD).
quotes_countYesNumber of sources that answered.
user_savingsYesaverage_price - user_pays (USD, what the caller still saves).
average_priceYesMean of all quotes (USD).
savings_grossYesaverage_price - best_price (USD, >= 0).
x_payment_responseNoBase64-encoded x402 settlement receipt (mirrors the X-PAYMENT-RESPONSE header). Only present when the call was paid with `x_payment`.
user_pays_micro_usdcYesuser_pays expressed in micro-USDC (x402 unit, 1e6).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A3.9/5.0
Behavior4/5

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

The annotations already declare readOnlyHint=true, and the description does not contradict that; it adds behavioral details about charging commission and payment via x402. It also discloses the free tier and the lack of an API key requirement, which are not captured by annotations. This enhances the agent's understanding of the tool's behavior beyond the structured metadata.

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 description is concise and well-structured, leading with the core function, then listing response fields and chains, and ending with payment and free-tier details. Each sentence adds value without redundancy. It is appropriately sized for the tool's complexity.

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?

The description covers the tool's purpose, the data it returns (breakdown fields), the supported chains, and the payment/free-tier mechanism. Given the presence of an output schema and annotations that already cover read-only behavior, the description is sufficiently complete for an agent to call the tool correctly. Minor gaps like rate limits or error handling are not critical given the schema.

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?

The input schema provides full descriptions for all four parameters (chain, wallet, api_key, x_payment), covering defaults, options, and payment details. The description repeats some of this (e.g., payment via x402) but does not add new meaning beyond the schema. With 100% schema coverage, the baseline of 3 is appropriate; the description offers marginal additional context.

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?

The description clearly states the tool's function: it queries multiple gas-price sources in parallel and returns the cheapest quote while charging a commission. It distinguishes itself from siblings like gas_fees by focusing on best-price comparison and commission. The specific chains and response fields are enumerated, making the purpose unambiguous.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies when to use the tool (when you need the best gas price across multiple sources) but does not explicitly contrast it with alternatives like gas_fees or token_price. It does mention usage constraints such as 'No API key' and '3 free calls per wallet,' but these are access conditions, not usage scenarios. Thus, usage guidance is implied rather than explicit.

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.