Skip to main content
Glama

Get Swap Price

get_swap_price

Fetch an indicative swap price for a token pair before trading. Provide sell and buy tokens to preview rates, slippage, and amounts via WalletChan's swap API.

Instructions

Fetch an indicative WalletChan swap price using the same first-party swap API as the extension.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
fromNoOptional taker/approved account.
chainNoChain name or ID. Defaults to the active WalletChan RPC chain.
takerNoAlias for from.
buyTokenYesBuy token address, symbol from the WalletChan token list, or native/ETH.
decimalsNoOptional token decimals when sellToken is an address not in the token list.
recipientNoOptional recipient for bought tokens.
sellTokenYesSell token address, symbol from the WalletChan token list, or native/ETH.
sellAmountNoDecimal sell amount in token units, e.g. 1.5. Use sellAmountWei for base units.
slippageBpsNoSlippage in basis points. Defaults to 500 (5%).
sellAmountWeiNoOptional base-unit sell amount as an integer string.
tokenDecimalsNoAlias for decimals.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.4.0

TDQS

B3.2/5.0
Behavior3/5

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

No annotations are provided, so the description carries the full behavioral burden. 'Indicative' is a genuinely useful disclosure (non-binding, may change), but it says nothing about rate limits, freshness, auth/account requirements, or side effects. For a read-only quote tool the safety profile is largely inferable from 'Fetch... price', but the description leaves gaps.

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?

A single front-loaded sentence with no filler. It is efficient, though the 'WalletChan'/'extension' references add little actionable information for an agent.

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

Completeness3/5

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

Parameters are fully covered by the schema, but with 11 params, no annotations, and no output schema, the description should at least indicate what the quote returns (price, route, amount) and any usage caveats. It is minimally adequate rather than 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 100%, so all 11 parameters including aliases (taker/from, tokenDecimals/decimals) and defaults are already documented in the schema. The description adds no parameter meaning beyond that, so baseline 3 applies.

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?

States a specific verb and resource (fetch a swap price) and scopes it as 'indicative' via the same first-party API as the extension, which distinguishes it from the sibling execution tool 'swap'. It does not name or contrast with siblings explicitly, so it stops short of a 5.

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

Usage Guidelines2/5

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

No explicit when-to-use guidance. 'Indicative' hints this is a pre-trade quote rather than execution, but the description never tells the agent to call this before 'swap' or instead of 'get_bridge_quote', nor states any prerequisites.

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