Skip to main content
Glama

preview_swap_quote

Optional advanced step: fetch a same-chain swap quote (CoW on EVM, Jupiter on Solana) and return previewQuoteId. Omit previewQuoteId on propose_* to bundle quote+proposal in one call. Does not execute or move funds.

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": {
      "fromWalletId": "<fromWalletId>",
      "sellSymbol": "<sellSymbol>",
      "buySymbol": "<buySymbol>",
      "amountUsd": "<amountUsd>"
    },
    "name": "preview_swap_quote"
  }
}

Input Schema

NameRequiredDescriptionDefault
buyMintNoSolana buy mint — omit for EVM
sellMintNoSolana sell mint — omit for EVM
amountUsdYesApproximate sell amount in USD
buySymbolYes
sellSymbolYes
toWalletIdNoOptional Solana receive wallet
fromWalletIdYesSource wallet id
buyTokenAddressNoEVM buy token (0x…) — omit for Solana
slippagePercentNoOptional Jupiter slippage 0–50
sellTokenAddressNoEVM sell token (0x…) — omit for Solana

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.2/5.0
Behavior4/5

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

With no annotations, the description carries the safety burden and explicitly states that the tool "Does not execute or move funds," while also identifying the returned previewQuoteId. It does not clarify whether quotes are indicative or guaranteed, their freshness or expiration, or how long the preview identifier remains usable.

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 compact sentences front-load the optional purpose, then cover the bundled alternative and non-executing behavior. Each sentence contributes distinct, useful information without unnecessary wording.

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?

Together with the fairly rich schema, the description supplies the chain scope, workflow role, returned identifier, and key safety behavior needed for selection and invocation. Explicit proposal-tool names, quote-validity semantics, and conditional chain-specific parameter requirements would make it more complete.

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 80%, and the chain-specific parameter descriptions already provide most invocation details. The description adds same-chain and provider context but no substantial parameter-level guidance beyond the schema, such as which token identifier fields are required for each chain.

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?

The description uses a specific verb and resource—"fetch a same-chain swap quote"—and identifies the CoW/EVM and Jupiter/Solana contexts. Returning previewQuoteId and explicitly not executing further distinguish it from proposal and bridge tools.

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?

Calling this an "Optional advanced step" and explaining that previewQuoteId can be omitted on propose_* to bundle quote and proposal gives useful workflow guidance and an alternative. It does not name the exact applicable proposal siblings or explain when a separate preview is preferable to bundling.

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