Skip to main content
Glama

swap_quote

Best-price same-chain token swap quote via the KyberSwap aggregator (ethereum, base, arbitrum, optimism, polygon, bsc). Includes a disclosed 0.1% integrator fee.

Input Schema

NameRequiredDescriptionDefault
chainYes
amountYesamount of tokenIn in token units, e.g. '0.05'
tokenInYessymbol (ETH, USDC, ...) or 0x address
tokenOutYes

Output Schema

NameRequiredDescriptionDefault
feeYesDisclosed Quietwork fee (already reflected in expectedOut)
chainYes
gasUsdNo
chainIdYes
tokenInYes
amountInYes
tokenOutYes
amountInUsdNo
amountInWeiYes
expectedOutYes
amountOutUsdNo
routerAddressYes
expectedOutWeiYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "properties": {
      +    "amountIn": {
      +      "type": "string"
      +    },
      +    "amountInUsd": {
      +      "type": "string"
      +    },
      +    "amountInWei": {
      +      "type": "string"
      +    },
      +    "amountOutUsd": {
      +      "type": "string"
      +    },
      +    "chain": {
      +      "type": "string"
      +    },
      +    "chainId": {
      +      "type": "integer"
      +    },
      +    "expectedOut": {
      +      "type": "string"
      +    },
      +    "expectedOutWei": {
      +      "type": "string"
      +    },
      +    "fee": {
      +      "description": "Disclosed Quietwork fee (already reflected in expectedOut)",
      +      "properties": {
      +        "amountWei": {
      +          "type": [
      +            "string",
      +            "null"
      +          ]
      +        },
      +        "bps": {
      +          "type": "number"
      +        },
      +        "note": {
      +          "type": "string"
      +        },
      +        "percent": {
      +          "type": "number"
      +        },
      +        "receiver": {
      +          "type": "string"
      +        },
      +        "takenFrom": {
      +          "type": "string"
      +        },
      +        "token": {
      +          "type": "string"
      +        },
      +        "venue": {
      +          "type": "string"
      +        }
      +      },
      +      "required": [
      +        "bps",
      +        "percent",
      +        "takenFrom",
      +        "receiver",
      +        "note"
      +      ],
      +      "type": "object"
      +    },
      +    "gasUsd": {
      +      "type": "string"
      +    },
      +    "routerAddress": {
      +      "type": "string"
      +    },
      +    "tokenIn": {
      +      "properties": {
      +        "address": {
      +          "type": "string"
      +        },
      +        "decimals": {
      +          "type": "integer"
      +        },
      +        "symbol": {
      +          "type": "string"
      +        }
      +      },
      +      "required": [
      +        "address",
      +        "decimals",
      +        "symbol"
      +      ],
      +      "type": "object"
      +    },
      +    "tokenOut": {
      +      "properties": {
      +        "address": {
      +          "type": "string"
      +        },
      +        "decimals": {
      +          "type": "integer"
      +        },
      +        "symbol": {
      +          "type": "string"
      +        }
      +      },
      +      "required": [
      +        "address",
      +        "decimals",
      +        "symbol"
      +      ],
      +      "type": "object"
      +    }
      +  },
      +  "required": [
      +    "chain",
      +    "chainId",
      +    "tokenIn",
      +    "tokenOut",
      +    "amountIn",
      +    "amountInWei",
      +    "expectedOut",
      +    "expectedOutWei",
      +    "fee",
      +    "routerAddress"
      +  ],
      +  "type": "object"
      +}
  2. First observed

TDQS

B3.4/5.0
Behavior3/5

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

With no annotations, the description carries the full burden. It usefully discloses the 0.1% integrator fee and that pricing comes from the KyberSwap aggregator, which are real behavioral facts beyond the schema. But it omits quote expiry/refresh expectations, rate limits, and explicit confirmation that this is a read-only price lookup with no on-chain effect.

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?

Two tight sentences, front-loaded with the core action and provider, then the cost disclosure. No filler.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

An output schema exists, so return values need no explanation, and the fee disclosure is a welcome addition. Still, an agent lacks the lifecycle context a quote tool needs: whether the quote is time-sensitive, how it relates to swap_build_tx for execution, and what distinguishes it from the other quote siblings.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is only 50% — tokenOut has no description and amount/tokenIn are partly documented. The description adds no per-parameter meaning; its chain list merely repeats the enum already in the schema and does nothing to compensate for the undocumented tokenOut.

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 ('Best-price same-chain token swap quote') plus the named aggregator (KyberSwap) and the supported chain set. The 'same-chain' qualifier and provider name let an agent separate it from cross-chain siblings (crosschain_rate, debridge_quote) and from other aggregators like zerox_quote or cow_quote.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

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

The description never says when to pick this over cow_quote, zerox_quote, velora_quote, or zerox_quote for the same pair, nor does it mention that swap_build_tx is the follow-up step to execute the quote. Usage is only implied by the word 'quote'.

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