Skip to main content
Glama

DFM · The Fund Management OS

Quote a token → token swap (app wallet)

swap_quote
Read-onlyIdempotent

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. On this remote server it reads the account of the read-only dfm_ key you connect with (Authorization: Bearer dfm_… header); without a key it answers how to connect one.

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": {
      "inputMint": "<inputMint>",
      "outputMint": "<outputMint>",
      "amountRaw": "<amountRaw>"
    },
    "name": "swap_quote"
  }
}

Input 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 observed

TDQS

A4.6/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint, destructiveHint=false and openWorldHint, and the description's leading 'READ-ONLY' is consistent with them. Beyond that it discloses real behavioral facts: the quote is inclusive of the DFM platform fee so `outAmount` must not be fee-adjusted, and on the remote server it reads the account of the `dfm_` Bearer key, returning connection instructions when no key is supplied. That auth precondition is exactly the kind of context annotations cannot carry, though it stops short of describing rate limits or quote expiry.

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 the operation and safety mode, then fee semantics, then units, then routing to alternatives, then auth — a sensible priority order. It is on the dense side with backticked identifiers and a parenthetical about the header, but every sentence carries information rather than repeating the name or schema.

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?

No output schema exists, and the description compensates by naming and interpreting the key return field (`outAmount` is what the user receives, fee already deducted). Combined with the routing rule, raw-units warning, and auth prerequisite, an agent has what it needs to call this correctly against a single sibling `swap`.

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 100%, so the schema already defines each field and lists pattern/range constraints; the baseline would be 3. The description adds interpretive meaning the schema does not: amounts are RAW base units carried as a string because 'a u64 does not fit a JS number,' which explains the type choice rather than merely restating it. It does not go further into `slippageBps` behavior beyond the schema's stated default.

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 and resource with scope: 'Price a swap of one token for another out of the app wallet, routed by Jupiter.' It also names the sibling flows it is not ('deposit') and the sibling it precedes ('swap'), so an agent can place 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?

Explicit sequencing: 'Use this before `swap` so the human sees the rate first,' plus an explicit exclusion: 'For DEPOSITING into a fund use `deposit`, not this.' Both the when and the when-not are stated outright rather than implied.

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.