Skip to main content
Glama

get_swap_quote

Idempotent

Get a provider-neutral swap estimate for research with no trading-provider calls, or create a firm quote intent for simulation using wallet, destination, slippage, and idempotency key.

Instructions

[Capability: available_with_tier_gate; tier: scout_capacity_signature_gated; API: /api/v1/agent/quote-intent; authority: /api/v1/agent/status] Research or firm quote: without idempotencyKey, return a provider-neutral market estimate with zero trading-provider calls. With idempotencyKey plus a real wallet/destination and slippage, create or reuse a firm single-provider quote intent and return simulationRequirements.intent_id for simulate_swap_execution. Active selection is LI.FI/Relay; 0x remains blocked while operator-paused.

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": {
      "fromChainId": "<fromChainId>",
      "toChainId": "<toChainId>",
      "fromToken": "<fromToken>",
      "toToken": "<toToken>",
      "fromAmount": "<fromAmount>"
    },
    "name": "get_swap_quote"
  }
}

Input Schema

NameRequiredDescriptionDefault
grantIdNo
toTokenYesResolver-supported symbol, native identifier, token address, or chain-qualified asset; discovery resolves canonical assets server-side.
protocolNo
slippageNo
fromTokenYesResolver-supported symbol, native identifier, token address, or chain-qualified asset; discovery resolves canonical assets server-side.
sessionIdNo
toAddressNo
toChainIdYes
fromAmountYes
safetyModeNo
fromChainIdYes
healthFactorNo
sessionTokenNo
executionModeNo
riskBufferUsdNo
walletAddressNo
continuationIdNo
idempotencyKeyNo
expectedUpsideUsdNo
executionTrialProofNoLocally signed commercial owner challenge; no transaction or delegation authority.
liquidationBufferPctNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv5.0.0

TDQS

B3.3/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=false, idempotentHint=true, openWorldHint=true and destructiveHint=false; the description still adds real value by explaining that the research path makes zero trading-provider calls, that the firm path creates or reuses an intent, and that provider selection is LI.FI/Relay with 0x operator-blocked. However, the tier gate ('scout_capacity_signature_gated') and the authority endpoint are asserted without saying what happens on denial, and nothing is said about latency, rate limits, or failure modes.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The two-mode contrast is front-loaded and the follow-on call is stated last, so the structure supports fast scanning. The bracketed capability/tier/API/authority prefix is dense internal metadata that competes with the actual purpose sentence, which keeps it from being maximally tight.

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

Completeness2/5

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

This is a 21-parameter, nested-object tool with no output schema; the description covers only the modal distinction and one return field (simulationRequirements.intent_id). Given that complexity, an agent cannot confidently supply the many undocumented optional parameters or predict gate failures, so the definition is under-specified for the call it enables.

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 description coverage is only 14% across 21 parameters. The description clarifies the single most important semantic (idempotencyKey switches between research and firm quote, and implicitly drives create-or-reuse) and mentions wallet/destination and slippage requirements, but it leaves the majority of inputs — grantId, sessionId/sessionToken, protocol, safetyMode, executionMode, healthFactor, riskBufferUsd, expectedUpsideUsd, liquidationBufferPct, continuationId, executionTrialProof — entirely unexplained in both schema and prose.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description names a specific verb and resource (get a research or firm swap quote) and explicitly splits the tool into two modes keyed on idempotencyKey, which is more than the name alone conveys. It differentiates from simulate_swap_execution by declaring the hand-off, but it never mentions get_solana_quote or get_token_prices, so the sibling boundary is only partly drawn.

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 gives explicit conditional routing: omit idempotencyKey for a cheap provider-neutral estimate, include it plus wallet/destination and slippage for a firm intent. It also names the follow-on tool (simulate_swap_execution). It stops short of stating exclusions such as when to prefer the Solana-specific quote tool or when the tier gate will refuse the call.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Deploy Server

Other Tools