Skip to main content
Glama

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.

Input Schema

NameRequiredDescriptionDefault
inYesinput token — 0x address, or ETH / WETH / USDC / BZPX
outYesoutput token — 0x address, or ETH / WETH / USDC / BZPX
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)
recipientNooptional 0x address; with it, decode_quote returns signable calldata
userMinOutNominimum output, base units, from a price you trust; required for calldata, which enforces exactly this value
deadlineSecNodeadline horizon in seconds, 10–3600 (default 120)
slippageBpsNo0–5000 (default 50); how far under the quoted net output userMinOut may sit

Output Schema

NameRequiredDescriptionDefault
okYesfalse: see code, error
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
    • 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"
  2. 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"
  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. 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"
      +}
  5. 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"
  6. Added
  7. Removed
  8. Added

TDQS

A4.7/5.0
Behavior5/5

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

Annotations cover the safety profile (readOnly, idempotent, openWorld=false), and the description adds concrete behavior: it returns a ready JSON-RPC request plus curl line and a `request` object, and performs no RPC itself. That workflow contract is context the annotations cannot supply.

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, front-loaded with the core action, followed by what is returned and the next step. No filler, nothing redundant with structured fields.

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 stateless quote-preparation tool with an output schema and rich annotations, the description covers the contract (what is returned, no RPC performed, handoff to decode_quote) sufficiently. An agent has everything needed to invoke and chain it.

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%, so every parameter (including exact-mode margins, deadlineSec range, slippageBps bounds) is already documented in the schema. The description adds workflow context but no per-parameter detail, so the baseline 3 is appropriate.

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 and resource ('Prepare an on-chain BlazePhoenix quote') and immediately scopes it ('to run on YOUR OWN RPC'), which distinguishes it from the decode step among siblings. An agent can tell what this produces 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 Guidelines5/5

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

Explicitly chains the workflow: run the returned eth_call on your node, then pass `request` plus the result hex to decode_quote. It also draws the boundary ('This server performs no RPC'), so the agent knows what happens here vs. elsewhere.

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