Skip to main content
Glama

verify_quote_fairness

Check whether a swap quote from an aggregator, broker, or bot is fair before you sign, returning a verdict with on-chain book evidence.

Instructions

Audit a swap quote someone else gave you (aggregator, broker, bot) BEFORE signing. Returns fair / overpaying / too_good_to_be_true with the configured-venue book as evidence. Ask this before accepting ANY number you did not produce yourself. Costs $0.05 per call.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "tokenIn": "<tokenIn>",
      "tokenOut": "<tokenOut>",
      "amountIn": "<amountIn>",
      "quotedOut": "<quotedOut>",
      "chainId": "<chainId>"
    },
    "name": "verify_quote_fairness"
  }
}

Input Schema

NameRequiredDescriptionDefault
chainIdYesREQUIRED. 1 Ethereum, 42161 Arbitrum, 8453 Base. There is no default; omitting it returns 400 missing_chain.
tokenInYesToken you are selling (symbol or 0x address)
amountInYesRAW units of tokenIn, as in the offer
tokenOutYesToken you would receive (symbol or 0x address)
quotedOutYesRAW units of tokenOut you were OFFERED
venueClaimedNoOptional: who gave you the offer

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.1.3

TDQS

A4.2/5.0
Behavior4/5

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

With no annotations supplied, the description carries the full burden and does well: it discloses the per-call cost ($0.05), the verdict taxonomy, and the evidence basis ("configured-venue book"). It stops short of stating read-only/non-mutating status or failure behavior for invalid quotes, which is the remaining gap.

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?

Three sentences, zero padding, and the urgency/timing constraint is front-loaded in the first clause. Every sentence contributes a distinct fact: what it does, what it returns, when to call it, and what it costs.

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?

For a six-parameter tool with five required fields and no output schema, the description supplies the return vocabulary and the evidence basis an agent needs to interpret results. It does not describe the shape of the evidence payload, which is the main residual gap.

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 six parameters are already documented, including the required chainId and the raw-unit conventions. The description adds framing (the quote comes from someone else, mapping loosely to venueClaimed) but no format or validation detail 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+object ("Audit a swap quote") and scopes it precisely to quotes produced by third parties ("aggregator, broker, bot"). It also names the artifact it returns ("fair / overpaying / too_good_to_be_true"), which cleanly separates it from quote-producing siblings like get_best_route.

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?

Gives a crisp decision rule — call it "BEFORE signing" and "before accepting ANY number you did not produce yourself" — which implicitly excludes self-generated quotes. It does not name the sibling that produces your own quotes, so the routing is inferable rather than explicit.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.