Skip to main content
Glama

Quote a token → token swap (app wallet)

swap_quote
Read-onlyIdempotent

Quote a token swap from the app wallet, routed by Jupiter and including the DFM platform fee, so users see the actual output amount before executing the trade.

Instructions

READ-ONLY. Price a swap of one token for another out of the app wallet, routed by Jupiter. The quote already includes the DFM platform fee, so outAmount is what the user actually receives — do not subtract a fee again when you report it. Amounts are RAW base units as a string (a u64 does not fit a JS number). Use this before swap so the human sees the rate first. For DEPOSITING into a fund use deposit, not this.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
amountRawYesRAW base units of inputMint to sell (respect that mint's decimals).
inputMintYesMint being sold.
outputMintYesMint being bought.
slippageBpsNoSlippage tolerance in bps; defaults to 50 (0.5%).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.1967

TDQS

A4.9/5.0
Behavior5/5

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

Annotations already establish read-only, idempotent, non-destructive behavior, but the description adds what they cannot: that the quote already includes the DFM platform fee, that `outAmount` is therefore the net amount the user receives, and the explicit instruction not to subtract a fee again. That is real downstream behavioral context an agent would otherwise get wrong.

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

Conciseness5/5

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

Roughly four dense sentences with the read-only declaration and the core purpose front-loaded. Every sentence carries actionable information: fee semantics, amount encoding, sequencing with `swap`, and the `deposit` exclusion. No filler.

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

Completeness5/5

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

There is no output schema, so the description must explain returns, and it does by defining `outAmount` semantics and the platform-fee inclusion. Combined with the sibling exclusions and sequencing guidance, an agent has everything needed to call this correctly and interpret the result.

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 description coverage is 100%, so the baseline is 3. The description goes beyond the schema by justifying the string type for amounts ('a u64 does not fit a JS number') and reinforcing the RAW base-unit convention for `amountRaw`, which reduces the most common input error for this tool.

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

Purpose5/5

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

States a specific action and resource: 'Price a swap of one token for another out of the app wallet, routed by Jupiter.' It is immediately distinguishable from the sibling `swap` (which executes) and `deposit` (which funds), and the leading 'READ-ONLY' makes the distinction from `swap` unambiguous.

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?

Explicitly prescribes the workflow: 'Use this before `swap` so the human sees the rate first.' It also names the exclusion and the correct alternative: 'For DEPOSITING into a fund use `deposit`, not this.' Both when-to-use and when-not-to-use are covered with named siblings.

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