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.

Decode a quote result

decode_quote
Read-onlyIdempotent

Decode the eth_call result YOUR node returned for a prepare_quote call: net output after the 0.28% fee, price impact, the Phoenix Check verdict (ok / caution / danger / blocked — fails closed) and, in preview mode, the on-chain floor the Quoter reports for the route (ironFloor, effectiveMinOut). With a recipient and a userMinOut, it also returns unsigned calldata verified against the request, whose minimum output is the higher of your userMinOut and the quoted net output less slippageBps, never under the on-chain floor (exact mode: exactly your userMinOut; a recipient without a usable userMinOut returns a txError instead). The calldata clears the swap math, not the token transfer: before sending, simulate it as an eth_call to the Router from the paying address. Pure computation: it cannot authenticate your node's answer.

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": {
      "request": "<request>",
      "result": "<result>"
    },
    "name": "decode_quote"
  }
}

Input Schema

NameRequiredDescriptionDefault
resultYesthe 0x hex result of the eth_call on your node
requestYesthe `request` object prepare_quote returned, verbatim

Output Schema

NameRequiredDescriptionDefault
okYesfalse: see code, error
txNo
codeNo
metaNo
modeNo
entryNo
errorNo
exactNo
quoteNo
routeNo
checksNo
minOutNo
usdOutNo
chainIdNo
tokenInNo
txErrorNo
amountInNo
approvalNo
deadlineNo
tokenOutNo
amountOutNo
encodedByNo
executeWithNo
unwrapAfterNo
wrapRequiredNo
grossAmountOutNo
protocolVersionNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedOutput schema / properties / usdOut
      Added value: +{
      +  "type": "object"
      +}
  2. Changed1 schema field changed
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "properties": {
      +    "amountIn": {
      +      "type": "string"
      +    },
      +    "amountOut": {
      +      "type": "string"
      +    },
      +    "approval": {
      +      "type": "object"
      +    },
      +    "chainId": {
      +      "type": "integer"
      +    },
      +    "checks": {
      +      "type": "object"
      +    },
      +    "code": {
      +      "type": "string"
      +    },
      +    "deadline": {
      +      "type": "string"
      +    },
      +    "encodedBy": {
      +      "type": "string"
      +    },
      +    "entry": {
      +      "type": "string"
      +    },
      +    "error": {
      +      "type": "string"
      +    },
      +    "exact": {
      +      "type": "object"
      +    },
      +    "executeWith": {
      +      "type": "object"
      +    },
      +    "grossAmountOut": {
      +      "type": "string"
      +    },
      +    "meta": {
      +      "type": "object"
      +    },
      +    "minOut": {
      +      "type": "string"
      +    },
      +    "mode": {
      +      "enum": [
      +        "preview",
      +        "exact"
      +      ]
      +    },
      +    "ok": {
      +      "description": "false: see code, error",
      +      "type": "boolean"
      +    },
      +    "protocolVersion": {
      +      "type": "string"
      +    },
      +    "quote": {
      +      "type": "object"
      +    },
      +    "route": {
      +      "type": "object"
      +    },
      +    "tokenIn": {
      +      "type": "string"
      +    },
      +    "tokenOut": {
      +      "type": "string"
      +    },
      +    "tx": {
      +      "type": "object"
      +    },
      +    "txError": {
      +      "type": "object"
      +    },
      +    "unwrapAfter": {
      +      "type": "boolean"
      +    },
      +    "wrapRequired": {
      +      "type": "boolean"
      +    }
      +  },
      +  "required": [
      +    "ok"
      +  ],
      +  "type": "object"
      +}
  3. Added
  4. Removed
  5. Added

TDQS

A4.4/5.0
Behavior5/5

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

Beyond the readOnly/idempotent annotations it discloses real behavioral traits: fail-closed verdict semantics, exact vs preview mode differences, the minimum-output resolution rule (higher of userMinOut and net output less slippageBps, never under the on-chain floor), the txError fallback, and the honest limitation that it can only verify swap math and cannot authenticate the node's answer.

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?

Scored against appropriateness rather than brevity: every clause is load-bearing for a tool that can emit transaction calldata, yet the nested parentheses and mode conditionals are dense. This is efficient, but the structure is harder to parse than a short formula plus a few bullets would be.

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 high-stakes decode-and-build-calldata tool, the description covers the safety-relevant behavior and the conditional paths completely. With an output schema present, its long enumeration of return values is partly redundant, but it costs little and reinforces the semantics of the verdict and floor fields.

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% with only two parameters, so the schema already carries the burden of documenting `request` and `result`. The description adds modest meaning by tying `result` to the caller's own node and `request` to prepare_quote's verbatim output, plus implicit fields (recipient, userMinOut, slippageBps, mode) living inside request, but it never explains them as parameter content.

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?

Opens with a specific verb+resource ("Decode the eth_call result") and explicitly scopes it to output of a prepare_quote call, distinguishing it from prepare_quote itself. It then enumerates what it derives: net output after fee, price impact, Phoenix Check verdict, floor values, and optional calldata.

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?

It clearly situates the tool downstream of prepare_quote and states the conditional branches: with recipient + userMinOut you get calldata, without a usable userMinOut you get a txError instead. It also gives an operational instruction (simulate the calldata as an eth_call to the Router before sending). No sibling alternative is named or excluded, so it falls short of a full 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