Skip to main content
Glama

Base on-chain reads and pay-per-call feeds (x402/MPP)

USD price of any token on Base by contract address, read live from the deepest Uniswap v3 pool (against USDC or WETH): p

base_token_price
Read-onlyIdempotent

USD price of any token on Base by contract address, read live from the deepest Uniswap v3 pool (against USDC or WETH): price, pool, fee tier, liquidity and the other pools quoted for comparison (token=0x...). For trading, portfolio and risk agents that need a price without a data-vendor key. Pay per call $0.01 USDC on Base via x402.

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": "base_token_price"
  }
}

Input Schema

NameRequiredDescriptionDefault
tokenNoERC-20 token address on Base, e.g. 0x4200000000000000000000000000000000000006 (WETH); if omitted, the WETH example is answered
x_paymentNosigned x402 payment (X-PAYMENT header value); omit on the first call to receive the price and payment requirements

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / token / description
      Previous value: -"ERC-20 token address on Base, 0x..."New value: +"ERC-20 token address on Base, e.g. 0x4200000000000000000000000000000000000006 (WETH); if omitted, the WETH example is answered"
  2. Added

TDQS

A4/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent, open-world and non-destructive, so the safety profile is covered. The description adds genuinely new behavioral context beyond that: the quote is computed live from the deepest Uniswap v3 pool, the result includes comparison pools, and access is metered at $0.01 USDC per call via x402 — a cost/auth detail an agent cannot infer from annotations. It stops short of explaining what happens when no qualifying pool exists.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded with the core capability, followed by the return fields, the audience, and the payment model — three compact sentences with no filler. The colon-separated field list is efficient rather than padded.

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?

With only two optional parameters and no output schema, the description does the heavy lifting by enumerating the returned fields and explaining the pay-per-call model. The remaining gap is edge-case behavior — what is returned or raised when the token has no USDC/WETH v3 pool — which matters for an open-world tool.

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 schema already documents both parameters, including the WETH default when token is omitted and the x402 first-call handshake. The description's '(token=0x...)' hint and per-call price restate rather than extend that, 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 precise verb+resource: returns the USD price of any Base ERC-20 token by contract address, sourced live from the deepest Uniswap v3 pool against USDC or WETH. It also enumerates the payload (price, pool, fee tier, liquidity, comparison pools), so an agent knows exactly what it gets without opening any schema.

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 frames the audience ('trading, portfolio and risk agents') and the condition 'need a price without a data-vendor key', which implies when it is appropriate. However, there are no explicit exclusions, no guidance on when to prefer another pricing source, and no stated limits on which tokens/pools qualify beyond 'any token on Base'.

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