Skip to main content
Glama

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, the minimum the Router enforces on-chain, price impact, the Phoenix Check verdict (ok / caution / danger / blocked — fails closed) and, with a recipient, verified unsigned calldata. Pure computation.

Input Schema

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

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
okYesfalse: see code, error
txNo
codeNo
metaNo
modeNo
entryNo
errorNo
exactNo
quoteNo
routeNo
checksNo
minOutNo
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
    • 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"
      +}
  2. Added
  3. Removed
  4. Added

TDQS

Score is being calculated.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources