Skip to main content
Glama

Hearth: x402 Pay-Safety & Discovery

dex_quote

Read-only

DEX swap quote (Uniswap v3). Best Uniswap v3 single-hop quote for swapping amountIn of tokenIn to tokenOut on Base, Ethereum, Arbitrum or Optimism, checking all fee tiers (0.01/0.05/0.3/1%). Returns amountOut, effective price, best fee tier, gas estimate. Tokens: ETH, USDC, USDT or 0x address. Read-only quote; no swap is executed. Deterministic, no LLM. Example output: {"chain":"base","tokenIn":"WETH","tokenOut":"USDC","amountIn":"1","amountOut":"2325.41","price":2325.41,"feeTier":500,"gasEstimate":"90000","venue":"uniswap-v3"}. Price: $0.0045 USDC on Base via x402 (pass the payment in _meta["x402/payment"]).

Input Schema

NameRequiredDescriptionDefault
chainNoChain: base (default), ethereum, arbitrum, optimism
tokenInYesETH, USDC, USDT or 0x address
amountInYesHuman amount of tokenIn, e.g. 1.5
tokenOutYesETH, USDC, USDT or 0x address

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.2/5.0
Behavior5/5

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

Goes well beyond the readOnlyHint/openWorldHint annotations: it discloses the exhaustive fee-tier scan, the exact returned fields, determinism ('no LLM'), and a concrete x402 payment requirement with the required _meta key. That payment/auth detail is exactly the kind of operational context annotations cannot convey.

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-loaded with the core purpose, then scope, returns, constraints, and an example — every block is useful. The embedded JSON example is verbose but earns its place since there is no output schema, though it makes the description dense.

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?

With no output schema, the example response fully covers the return shape (amountOut, price, feeTier, gasEstimate, venue). Supported chains, tokens, price, and payment mechanism are all present, so an agent has everything needed to call it 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 all four parameters are already documented with defaults (base) and accepted token forms. The description restates the token list and chains but adds no syntax or format detail beyond the schema, so the 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 ('DEX swap quote (Uniswap v3)') and immediately scopes it: single-hop, four named chains, all fee tiers. An agent can distinguish it from token_price or the ai_* siblings without opening the 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?

Usage is only implied — the phrase 'for swapping amountIn of tokenIn to tokenOut' suggests it is a pre-trade quote, and 'Read-only quote; no swap is executed' clarifies the boundary. But there is no explicit when-to-use/when-not guidance and no named alternative (e.g. token_price for a simple spot price).

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