Skip to main content
Glama

Get swap or bridge quotes with execution plans

get_quotes_with_plans
Read-only

A quote, execution plan, simulation or wallet approval is not permission to trade. Robinhood Stock Tokens are tokenised debt securities subject to issuer restrictions and applicable law. Before requesting signatures or submitting approvals or trades, establish the user's relevant jurisdiction and eligibility, including location, residence or entity incorporation, US-person status under Regulation S, any person for whose account or benefit the transaction is made, and issuer Prohibited Investor restrictions. Never infer these facts from an agent or server IP. If required facts or asset-policy coverage are unknown, do not proceed. Only the user or an authorized representative of the actual investor may provide an explicit factual attestation; an agent must not attest on their behalf. A known prohibited fact cannot be overridden by attestation. An attestation is not a license, legal exemption or substitute for required screening. Keep the attestation client-side; do not send it to the quote API or MCP server. No blanket disposal exemption applies. Quote EVM swaps: Ekubo/0x same-chain; Across/LayerZero/LI.FI cross-chain. Plans: sender plus exactly one of whole slippage_bps or exact-input max_output_loss in output base units. Omit all three for indicative quotes. Pass execution.execution_plan_reference unchanged to wallet simulation; send that simulation for owner authorization. Honor initial/revised numeric bounds exactly. No autonomous widening after failure. Delegated increase: choose/disclose a reasonable finite bound, not unlimited slippage. Changed terms need fresh plans, validated minimum output and new simulation/authorization; never edit plans or reuse reverted/expired bytes or old simulations. All/max: exact wallet balance. Compare amount_out/native_fee. LayerZero/LI.FI: get_value_transfer_status. Failures: unavailable_sources (provider), execution_unavailable (plan).

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": {
      "chain_id": "<chain_id>",
      "token_in": "<token_in>",
      "token_out": "<token_out>",
      "quote_type": "<quote_type>",
      "amount": "<amount>"
    },
    "name": "get_quotes_with_plans"
  }
}

Input Schema

NameRequiredDescriptionDefault
amountYesBase units (positive decimal integer)
senderNoTransaction sender; pass with exactly one of slippage_bps or max_output_loss for plans (address)
chain_idYesEVM chain ID
token_inYesRaw EVM address or CAIP-10 eip155:<chain_id>:<address>; all-zeroes denotes the native token
recipientNoDefaults to sender (address)
token_outYesRaw EVM address or CAIP-10 eip155:<chain_id>:<address>; all-zeroes denotes the native token
quote_typeYes
slippage_bpsNoWhole-bps calldata bound: 0.1% = 10. With sender use this OR max_output_loss. Honor explicit initial/revised tolerance exactly; no server default; gas-sized budgets are optional if unspecified. Sub-bps: use max_output_loss, not 0 or 1 bps. No autonomous widening after failure; user changes need fresh plans.
max_output_lossNoExact-input loss from quoted output: decimal integer in output base units; requires sender, omit slippage_bps. Ekubo subtracts exactly; 0x floors to ppm in two quotes and verifies minBuyAmount; positive sub-ppm fails. Others unsupported. Honor initial/revised budgets exactly; no server default; gas-sized budgets are optional if unspecified. No rounding to 1 bps.
include_raw_quotesNoEcho raw provider responses; only to diagnose a provider
destination_chain_idNoDestination chain; defaults to chain_id for a same-chain swap
swap_deadline_minutesNoEkubo router route deadline; default 30

Output Schema

NameRequiredDescriptionDefault
quotesNo
jurisdictionNojurisdiction metadata (ekubo-token-jurisdictions-v2): coverage, execution_hold, restricted_jurisdictions, per-asset classification

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • changedInput schema / properties / max_output_loss / description
      Previous value: -"Exact-input loss budget from quoted output, output-token base units as a decimal integer string; requires sender, omit slippage_bps. Ekubo: exact subtraction. 0x: two quotes, floor budget to whole ppm, verify final minBuyAmount; positive budgets below 1 ppm fail, never become zero. Others unsupported. Convert gas value to output base units rounding down; never widen to 1 bps."New value: +"Exact-input loss from quoted output: decimal integer in output base units; requires sender, omit slippage_bps. Ekubo subtracts exactly; 0x floors to ppm in two quotes and verifies minBuyAmount; positive sub-ppm fails. Others unsupported. Honor initial/revised budgets exactly; no server default; gas-sized budgets are optional if unspecified. No rounding to 1 bps."
    • changedInput schema / properties / slippage_bps / description
      Previous value: -"Whole-bps calldata bound: 0.1% = 10. With sender supply this OR max_output_loss. Honor user preference; size near gas value / notional * 10,000. For positive sub-bps budgets use max_output_loss, not 0 or 1 bps. No generic 50 bps default. After slippage failure re-quote, never widen or retry reverted bytes."New value: +"Whole-bps calldata bound: 0.1% = 10. With sender use this OR max_output_loss. Honor explicit initial/revised tolerance exactly; no server default; gas-sized budgets are optional if unspecified. Sub-bps: use max_output_loss, not 0 or 1 bps. No autonomous widening after failure; user changes need fresh plans."
  2. First observed

TDQS

A3.9/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true, and nothing in the description contradicts that — quotes, plans and simulations are non-mutating artifacts, so there is no annotation contradiction. The description adds substantial behavioral context beyond the annotation: failure taxonomy (unavailable_sources vs execution_unavailable), the rule that the attestation must stay client-side and never reach the quote API or MCP server, the no-server-default tolerance policy, and the downstream obligation to pass execution_plan_reference unchanged into wallet simulation. It does not cover rate limits or partial/streamed result behavior, which keeps it short of the top band.

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 content is dense and largely factual, but it is not front-loaded: roughly the first half is a legal/attestation block that never states the tool's function, and the operationally important lines ('Quote EVM swaps: ...', 'Plans: sender plus exactly one of ...') are buried mid-paragraph in a stream of run-on sentences. Size is defensible for a tool with this many constraints, but the ordering forces an agent to read the whole block before learning what the call does.

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?

An output schema exists, so return-value documentation is not owed, and with 12 parameters at 92% schema coverage plus a rich annotation the remaining burden is small. The description supplies the missing pieces an agent would otherwise guess at: plan-vs-indicative modes, failure code meanings, and the post-quote simulation/authorization flow. The main residual gap is the compliance preamble's relationship to this specific call — it reads as policy for the wider trade flow rather than a precondition of get_quotes_with_plans.

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

Parameters4/5

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

Schema coverage is 92%, so the baseline is 3 and the schema already documents most parameters well. The description nevertheless adds genuine cross-parameter meaning not expressible in the schema: sender must be combined with exactly one of slippage_bps or max_output_loss, all three are omitted for indicative quotes, sub-bps precision must go through max_output_loss rather than 0 or 1 bps, and Ekubo subtracts exactly while 0x floors to ppm and fails on positive sub-ppm loss. It also clarifies that all/max means the exact wallet balance.

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 does state a specific verb and resource — quoting EVM swaps and generating execution plans, with the protocols named (Ekubo/0x same-chain; Across/LayerZero/LI.FI cross-chain) — so an agent can tell this is a quote/plan builder rather than a state-reading tool. However, the actual purpose arrives only after a long compliance preamble about attestation and jurisdiction, so the first impression an agent gets is regulatory policy rather than what the tool does. It also never distinguishes itself from the prepare_*/get_* siblings beyond the implied quote-vs-execute split.

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

Usage Guidelines5/5

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

Explicit conditional guidance is present on nearly every axis: omit sender/slippage_bps/max_output_loss for indicative quotes, pass sender plus exactly one bound for plans, do not proceed when required facts or asset-policy coverage are unknown, and use get_value_transfer_status for LayerZero/LI.FI status checks instead of re-quoting. It also states what is prohibited (autonomous widening after failure, editing plans, reusing reverted/expired bytes or old simulations) and what is required after terms change, which is exactly the when/when-not guidance this dimension rewards.

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.