Skip to main content
Glama
Replaced by its MCP Registry listing

This endpoint is listed in the official MCP Registry as BlazePhoenix on-chain DEX aggregator. If you published it, claim ownership there.

Prepare an on-chain quote

prepare_quote
Read-onlyIdempotent

Prepare an on-chain BlazePhoenix quote to run on YOUR OWN RPC. Returns the exact eth_call (Quoter address + calldata, as a ready JSON-RPC request and a curl line) plus a request object. Run the call on your node, then pass request and the result hex to decode_quote. This server performs no RPC.

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": {
      "chain": "<chain>",
      "in": "<in>",
      "out": "<out>",
      "amountIn": "<amountIn>"
    },
    "name": "prepare_quote"
  }
}

Input Schema

NameRequiredDescriptionDefault
inYesinput token — 0x address, or ETH / WETH / USDC
outYesoutput token — 0x address, or ETH / WETH / USDC
usdNotrue → also `usd.in`: the eth_call valuing amountIn in USD (via USDC; USDG on Robinhood Chain), to decode with decode_usd_value; decode_quote then returns `usdOut`, the call valuing the output
chainYesbase | eth | optimism | arbitrum | robinhood (or a chain id)
exactNotrue → previewPlanExact: every leg dry-run on its pool in this block; with recipient + userMinOut also calldata (exact mode applies a safety margin: userMinOut at or under exactOut less 50 bps). No tokens move from a holder, so a token that blocks or taxes its own transfer still quotes; simulate the swap from the holder to test that
versionNoprotocol version: latest (default) | 1 | 2 | 2.0.0
amountInYesinput amount in base units (wei-style integer string)
blockHashNowith usd: the hash of the block to pin usd.in at ({blockHash, requireCanonical: true}); read it with eth_getBlockByNumber and pass it to decode_usd_value too
recipientNooptional 0x address; with it (and userMinOut), decode_quote returns unsigned calldata that clears the swap math; simulate it as an eth_call to the Router from the payer before sending
userMinOutNominimum output, base units, from a price you trust; required for calldata, which enforces the higher of it and the quoted net output less slippageBps (exact mode: exactly this value)
deadlineSecNodeadline horizon in seconds, 10–3600 (default 120)
slippageBpsNo0–5000 (default 50); the calldata minimum is never under the quoted net output less this (exact mode: how far under it userMinOut may sit)

Output Schema

NameRequiredDescriptionDefault
okYesfalse: see code, error
usdNo
callNo
codeNo
curlNo
modeNo
noteNo
errorNo
decodeNo
chainIdNo
requestNo
contractsNo
rpcRequestNo
protocolVersionNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changed
    • addedInput schema / properties / blockHash
      Added value: +{
      +  "description": "with usd: the hash of the block to pin usd.in at ({blockHash, requireCanonical: true}); read it with eth_getBlockByNumber and pass it to decode_usd_value too",
      +  "type": "string"
      +}
    • addedInput schema / properties / usd
      Added value: +{
      +  "description": "true → also `usd.in`: the eth_call valuing amountIn in USD (via USDC; USDG on Robinhood Chain), to decode with decode_usd_value; decode_quote then returns `usdOut`, the call valuing the output",
      +  "type": "boolean"
      +}
    • addedOutput schema / properties / usd
      Added value: +{
      +  "type": "object"
      +}
  2. Changed5 schema fields changed
    • changedInput schema / properties / in / description
      Previous value: -"input token — 0x address, or ETH / WETH / USDC / BZPX"New value: +"input token — 0x address, or ETH / WETH / USDC"
    • changedInput schema / properties / out / description
      Previous value: -"output token — 0x address, or ETH / WETH / USDC / BZPX"New value: +"output token — 0x address, or ETH / WETH / USDC"
    • changedInput schema / properties / recipient / description
      Previous value: -"optional 0x address; with it, decode_quote returns signable calldata"New value: +"optional 0x address; with it (and userMinOut), decode_quote returns unsigned calldata that clears the swap math; simulate it as an eth_call to the Router from the payer before sending"
    • changedInput schema / properties / slippageBps / description
      Previous value: -"0–5000 (default 50); how far under the quoted net output userMinOut may sit"New value: +"0–5000 (default 50); the calldata minimum is never under the quoted net output less this (exact mode: how far under it userMinOut may sit)"
    • changedInput schema / properties / userMinOut / description
      Previous value: -"minimum output, base units, from a price you trust; required for calldata, which enforces exactly this value"New value: +"minimum output, base units, from a price you trust; required for calldata, which enforces the higher of it and the quoted net output less slippageBps (exact mode: exactly this value)"
  3. Changed3 schema fields changed
    • changedInput schema / properties / exact / description
      Previous value: -"true → previewPlanExact: every leg dry-run on its pool in this block (no calldata). No tokens move from a holder, so a token that blocks or taxes its own transfer still quotes; simulate the swap from the holder to test that"New value: +"true → previewPlanExact: every leg dry-run on its pool in this block; with recipient + userMinOut also calldata (exact mode applies a safety margin: userMinOut at or under exactOut less 50 bps). No tokens move from a holder, so a token that blocks or taxes its own transfer still quotes; simulate the swap from the holder to test that"
    • changedInput schema / properties / slippageBps / description
      Previous value: -"0–5000 (default 50); never below the on-chain floor"New value: +"0–5000 (default 50); how far under the quoted net output userMinOut may sit"
    • changedInput schema / properties / userMinOut / description
      Previous value: -"optional explicit minimum output, base units"New value: +"minimum output, base units, from a price you trust; required for calldata, which enforces exactly this value"
  4. Changed3 schema fields changed
    • changedInput schema / properties / exact / description
      Previous value: -"true → previewPlanExact: every leg dry-run on its pool in this block; with recipient + userMinOut also calldata (exact mode applies a safety margin: userMinOut at or under exactOut less 50 bps). No tokens move from a holder, so a token that blocks or taxes its own transfer still quotes; simulate the swap from the holder to test that"New value: +"true → previewPlanExact: every leg dry-run on its pool in this block (no calldata). No tokens move from a holder, so a token that blocks or taxes its own transfer still quotes; simulate the swap from the holder to test that"
    • changedInput schema / properties / slippageBps / description
      Previous value: -"0–5000 (default 50); how far under the quoted net output userMinOut may sit"New value: +"0–5000 (default 50); never below the on-chain floor"
    • changedInput schema / properties / userMinOut / description
      Previous value: -"minimum output, base units, from a price you trust; required for calldata, which enforces exactly this value"New value: +"optional explicit minimum output, base units"
  5. Changed3 schema fields changed
    • changedInput schema / properties / exact / description
      Previous value: -"true → previewPlanExact: every leg dry-run on its pool in this block (no calldata). No tokens move from a holder, so a token that blocks or taxes its own transfer still quotes; simulate the swap from the holder to test that"New value: +"true → previewPlanExact: every leg dry-run on its pool in this block; with recipient + userMinOut also calldata (exact mode applies a safety margin: userMinOut at or under exactOut less 50 bps). No tokens move from a holder, so a token that blocks or taxes its own transfer still quotes; simulate the swap from the holder to test that"
    • changedInput schema / properties / slippageBps / description
      Previous value: -"0–5000 (default 50); never below the on-chain floor"New value: +"0–5000 (default 50); how far under the quoted net output userMinOut may sit"
    • changedInput schema / properties / userMinOut / description
      Previous value: -"optional explicit minimum output, base units"New value: +"minimum output, base units, from a price you trust; required for calldata, which enforces exactly this value"
  6. Changed1 schema field changed
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "properties": {
      +    "call": {
      +      "type": "object"
      +    },
      +    "chainId": {
      +      "type": "integer"
      +    },
      +    "code": {
      +      "type": "string"
      +    },
      +    "contracts": {
      +      "type": "object"
      +    },
      +    "curl": {
      +      "type": "string"
      +    },
      +    "decode": {
      +      "type": "object"
      +    },
      +    "error": {
      +      "type": "string"
      +    },
      +    "mode": {
      +      "const": "prepare"
      +    },
      +    "note": {
      +      "type": "string"
      +    },
      +    "ok": {
      +      "description": "false: see code, error",
      +      "type": "boolean"
      +    },
      +    "protocolVersion": {
      +      "type": "string"
      +    },
      +    "request": {
      +      "type": "object"
      +    },
      +    "rpcRequest": {
      +      "type": "object"
      +    }
      +  },
      +  "required": [
      +    "ok"
      +  ],
      +  "type": "object"
      +}
  7. Changed1 schema field changed
    • changedInput schema / properties / exact / description
      Previous value: -"true → previewPlanExact (execution-grade dry-run, no calldata)"New value: +"true → previewPlanExact: every leg dry-run on its pool in this block (no calldata). No tokens move from a holder, so a token that blocks or taxes its own transfer still quotes; simulate the swap from the holder to test that"
  8. Added
  9. Removed
  10. Added

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true, idempotentHint=true, and openWorldHint=false, so the safety profile is covered. The description adds genuinely new behavioral facts: the server performs no RPC, the caller must execute the eth_call themselves, and the return payload consists of a ready JSON-RPC request, a curl line, and a `request` object. It does not discuss latency, chain availability limits, or failure modes, so it earns a 4 rather than 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.

Conciseness5/5

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

Three tight sentences: purpose and return shape first, then the execution instruction, then the handoff to decode_quote. No repetition, no filler, and the most decision-relevant constraint ('YOUR OWN RPC', 'no RPC') is front-loaded.

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 12-parameter tool with a full output schema, the description supplies exactly the missing connective tissue: who executes the call, what payload comes back, and which tool consumes the result. Return-value details are correctly deferred to the output schema, and per-parameter nuance is covered at 100% in 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?

Schema description coverage is 100% and the 12 parameters carry detailed per-field docs (including exact mode, blockHash pinning, recipient/userMinOut calldata behavior), so the schema already does the heavy lifting and baseline 3 applies. The description itself adds essentially no parameter-level meaning beyond naming `request` and the result hex.

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 ('Prepare an on-chain BlazePhoenix quote') and immediately defines the scope: it returns the eth_call (Quoter address + calldata as JSON-RPC and curl) plus a `request` object. It also distinguishes itself from the sibling decode_quote by assigning that tool the follow-up step, so an agent can place this tool in the pipeline 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 Guidelines4/5

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

Gives clear operational context: run the call on your own node, then pass `request` and the result hex to decode_quote, and explicitly states 'This server performs no RPC.' That is strong when-to-use guidance and a named handoff. It stops short of stating exclusions (e.g. when to prefer decode_quote or a direct quoter call instead), so it is not a 5.

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