Skip to main content
Glama

Swap Quote (Read-Only)

pumpfun_quote_swap
Read-only

Read-only price quote for a pump.fun AMM (PumpSwap) swap. No signing or tx sending. One of inputMint/outputMint must be wSOL (So11111111111111111111111111111111111111112). Only GRADUATED coins have an AMM pool; for a coin still on its bonding curve use get_bonding_curve instead. Pricing runs on the pool effective quote reserves (quote vault balance + pool.virtual_quote_reserves, a SIGNED i128 that is commonly negative because PumpSwap v2 trades keep waiting protocol and creator fees in the vault and subtract them there); the base side is the raw base vault balance. Returns amountOut, priceImpactBps, route, expiresAtMs, plus the reserves the quote was computed from so the number can be reproduced. Use this to size a trade on a graduated coin, or to measure its pool depth, before executing anywhere.

Input Schema

NameRequiredDescriptionDefault
networkNomainnet
amountInYesInput amount in raw base units (lamports for SOL).
inputMintYesInput token mint (base58).
outputMintYesOutput token mint (base58).
slippageBpsNoSlippage tolerance in basis points (default 100 = 1%).

Output Schema

NameRequiredDescriptionDefault
routeYesAMM pool address the quote routes through (base58)
amountOutYesExpected output amount in raw base units
expiresAtMsYesEpoch ms after which the quote is stale
base_reserveNoRaw base vault balance. Unchanged by the virtual-reserve rollout.
quote_reserveNoRaw quote vault balance, before virtual reserves are added. Includes protocol and creator fees waiting for a sweep, so it overstates liquidity on its own; price on effective_quote_reserve.
priceImpactBpsYesPrice impact in basis points
virtual_quote_reservesNoPool.virtual_quote_reserves, a SIGNED i128 serialized as a decimal string. Positive values add depth held outside the vault; negative values remove fees that sit in the vault waiting for a sweep (common since the PumpSwap v2 trades). Parse it as a signed integer: never unsigned, never clamped to 0, never absolute-valued.
effective_quote_reserveNoquote_reserve + virtual_quote_reserves (signed addition). This is what the quote is priced against; the program guarantees it is never negative.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changed
    • changedOutput schema / properties / effective_quote_reserve / description
      Previous value: -"quote_reserve + virtual_quote_reserves. This is what the quote is priced against."New value: +"quote_reserve + virtual_quote_reserves (signed addition). This is what the quote is priced against; the program guarantees it is never negative."
    • changedOutput schema / properties / quote_reserve / description
      Previous value: -"Raw quote vault balance, before virtual reserves are added."New value: +"Raw quote vault balance, before virtual reserves are added. Includes protocol and creator fees waiting for a sweep, so it overstates liquidity on its own; price on effective_quote_reserve."
    • changedOutput schema / properties / virtual_quote_reserves / description
      Previous value: -"Pool.virtual_quote_reserves. Quote-side liquidity the pool carries outside its vault. 0 on non-launchpad pools."New value: +"Pool.virtual_quote_reserves, a SIGNED i128 serialized as a decimal string. Positive values add depth held outside the vault; negative values remove fees that sit in the vault waiting for a sweep (common since the PumpSwap v2 trades). Parse it as a signed integer: never unsigned, never clamped to 0, never absolute-valued."
  2. Changed4 schema fields changed
    • addedOutput schema / properties / base_reserve
      Added value: +{
      +  "description": "Raw base vault balance. Unchanged by the virtual-reserve rollout.",
      +  "type": "string"
      +}
    • addedOutput schema / properties / effective_quote_reserve
      Added value: +{
      +  "description": "quote_reserve + virtual_quote_reserves. This is what the quote is priced against.",
      +  "type": "string"
      +}
    • addedOutput schema / properties / quote_reserve
      Added value: +{
      +  "description": "Raw quote vault balance, before virtual reserves are added.",
      +  "type": "string"
      +}
    • addedOutput schema / properties / virtual_quote_reserves
      Added value: +{
      +  "description": "Pool.virtual_quote_reserves. Quote-side liquidity the pool carries outside its vault. 0 on non-launchpad pools.",
      +  "type": "string"
      +}
  3. First observed

TDQS

A4.8/5.0
Behavior5/5

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

Annotations already cover safety (readOnlyHint, destructiveHint=false), but the description adds real context: no signing/tx sending, the GRADUATED-only precondition, and the non-obvious pricing mechanics (effective quote reserves = vault balance + signed virtual_quote_reserves, commonly negative). That reserve methodology is exactly the kind of behavior an agent cannot infer from annotations.

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?

Front-loaded with purpose and hard constraints, and every sentence is substantive. It is on the long side and the i128 reserve aside is dense, but that detail is load-bearing for reproducing the quote rather than 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?

For a quote tool with an output schema, this covers preconditions, routing to the alternative, pricing mechanics, and a return-field summary. Nothing an agent needs to call it correctly is missing.

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 80% and the amountIn/network/slippage semantics are already documented. The description adds one important constraint absent from the schema: one of inputMint/outputMint must be wSOL. This materially improves correct invocation but doesn't cover every parameter detail.

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 verb (quote) and resource (pump.fun PumpSwap AMM swap) with the read-only scope up front. It explicitly names the sibling to use for a different case (get_bonding_curve for coins still on the bonding curve), so an agent can distinguish it without opening any schema.

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?

Gives explicit when-to-use (size a trade on a graduated coin, measure pool depth, before executing anywhere) and when-not (bonding-curve coins -> get_bonding_curve). The alternative and the selecting condition are both named.

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.