Skip to main content
Glama

FarmDash Agent OS

get_swap_quote

Idempotent

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 observed

TDQS

A3.5/5.0
Behavior4/5

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

The annotations say readOnlyHint=false and idempotentHint=true, and the description explains the mode-dependent behavior behind that: without idempotencyKey there are zero trading-provider calls, while with it the tool creates or reuses a firm quote intent. It adds useful provider-gating context and points to simulationRequirements.intent_id, but does not cover intent expiry, storage, or permission requirements.

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 description is three dense sentences that front-load the research-versus-firm distinction and then add downstream and provider constraints. There is no filler, though the jargon-heavy prose could be structured more clearly for a 21-parameter tool.

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 complex 21-parameter tool with 14% schema coverage and no output schema, the description covers the core mode decision and one downstream field but leaves most optional parameters and the research-mode return shape unexplained. It is not complete enough to guide correct population of all parameters without additional schema knowledge.

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, and the description only clarifies a few: idempotencyKey switches between research and firm modes, slippage and a real wallet/destination are required for firm quotes, and LI.FI/Relay are the active providers. Many parameters such as executionMode, safetyMode, riskBufferUsd, healthFactor, grantId, session tokens, and continuationId remain unexplained in both schema and description.

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 that this is a swap-quote tool with two modes: a provider-neutral research estimate and a firm single-provider quote intent. It distinguishes the modes by the presence of idempotencyKey and names the downstream tool simulate_swap_execution, though it does not differentiate itself from other quote siblings such as get_composer_quote or get_solana_quote.

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 mode-selection guidance: omit idempotencyKey for a market estimate with zero trading-provider calls, or include it with a real wallet/destination and slippage to create or reuse a firm quote. It also states the active provider selection and that 0x is blocked, but it does not explain when to choose this tool over other quote tools.

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