Skip to main content
Glama

get_swap_quote

Idempotent

Returns a provider-neutral swap estimate for research, or creates a firm single-provider quote intent when idempotency, wallet, destination, and slippage are supplied, yielding a simulation intent ID.

Instructions

[Capability: available_with_tier_gate; tier: scout_quote_signature_and_simulation_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.

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.4/5.0
Behavior4/5

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

Annotations already declare idempotentHint=true, openWorldHint=true, readOnlyHint=false, and destructiveHint=false. The description adds genuine beyond-annotation context: zero trading-provider calls in research mode, intent reuse under idempotency, provider selection (LI.FI/Relay) with 0x blocked by operator pause, and tier gating. This is a meaningful behavioral contribution, though it doesn't address auth requirements or rate limits.

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

Conciseness3/5

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

The substantive content is two efficient, front-loaded sentences that earn their place. But the leading bracketed '[Capability: ...; API: ...; authority: ...]' block is metadata noise that competes for the agent's attention ahead of the actual behavior. Moderately structured but not 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?

For a high-complexity tool with 21 parameters, nested objects, no output schema, and 14% schema coverage, the description is thin on parameter meaning and does not describe the return shape beyond mentioning simulationRequirements.intent_id. It covers the core research/firm-quote flow but leaves an agent largely unequipped to populate the many undocumented parameters correctly.

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?

With 21 parameters and only 14% schema description coverage, the description must carry the burden but only clarifies three gating parameters (idempotencyKey, slippage, wallet/destination). Roughly a dozen parameters (grantId, sessionToken, sessionId, safetyMode, healthFactor, executionMode, riskBufferUsd, expectedUpsideUsd, executionTrialProof, continuationId, liquidationBufferPct, protocol) get no semantic explanation in either the description or schema, leaving major gaps.

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 clearly states the tool's dual function: a provider-neutral market estimate without an idempotencyKey, or a firm single-provider quote intent with one. It names the downstream consumer (simulate_swap_execution) and the active providers (LI.FI/Relay), which distinguishes it from siblings. The dense internal jargon (tier gates, API paths) slightly obscures the core purpose but the verb+resource is unambiguous.

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 explicitly splits the two usage modes: without idempotencyKey for research, with idempotencyKey plus wallet/destination/slippage for a firm quote. It also routes the agent to simulate_swap_execution and notes 0x is operator-blocked. However, it does not compare against nearby siblings like simulate_intent, create_intent, or prepare_intent, leaving some selection ambiguity.

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