Skip to main content
Glama

quote_and_create

Get a quote and create an order from it in one call, returning both as quote and order. Takes the get_quote arguments, with refund_address required. Creating an order screens its addresses, so use this only once the user wants to swap, and get_quote to check a price.

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": {
      "src_chain": "<src_chain>",
      "dst_chain": "<dst_chain>",
      "src_token": "<src_token>",
      "dst_token": "<dst_token>",
      "amount": "<amount>",
      "recipient": "<recipient>",
      "refund_address": "<refund_address>"
    },
    "name": "quote_and_create"
  }
}

Input Schema

NameRequiredDescriptionDefault
amountYesAmount to swap as an integer string in the source token's smallest unit
senderNoAddress sending the funds, encoded for the source chain. On onramps it lets create-order return a funded PSBT, which may spend the address's ordinals, inscriptions or runes as plain sats: omit it for an address holding any.
slippageNoSlippage tolerance in basis points (max 1000). Omit to let the gateway pick one per route.
dst_chainYesDestination chain
dst_tokenYesDestination token address; "0x0000000000000000000000000000000000000000" for BTC/native
recipientYesAddress receiving the funds, encoded for the destination chain
src_chainYesSource chain, e.g. "bitcoin", "ethereum", "base", "bob", "tron"
src_tokenYesSource token address; "0x0000000000000000000000000000000000000000" for BTC/native
affiliatesNoAffiliate fees as comma-separated `<address>:<bps>` pairs, e.g. "0xabc...:50". Addresses are EVM, except on a token swap to Tron, where a Tron address is also accepted.
refund_addressYesRefund address on the source chain

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.4/5.0
Behavior4/5

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

Annotations only declare readOnlyHint=false, openWorldHint=true, destructiveHint=false; the description adds real behavioral context beyond them, namely that creating an order performs address screening and that the call returns two objects. It still does not say what happens if quoting succeeds but order creation fails, nor that the write side is effectively irreversible once submitted.

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?

Three tight sentences: what it does and returns first, parameter inheritance second, usage boundary and screening rationale last. No restated field lists, no filler.

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

Completeness4/5

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

For a ten-parameter write tool with no output schema, the description usefully names the two return keys and explains the screening prerequisite. The remaining gap is failure semantics in a combined read-then-write call, which matters given there is no output schema to fall back on.

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 ten parameters are already documented, including the `sender` ordinals warning and `slippage` bounds. The description only restates that `refund_address` is required, which the schema's required list already conveys, so it adds marginal meaning beyond structured data.

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 composite action (get a quote AND create an order in one call) and names the return keys `quote` and `order`. It also distinguishes itself from siblings by explaining it takes the `get_quote` arguments plus a required `refund_address`, so an agent can tell it apart from `get_quote` and `create_order` without opening either 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 an explicit when-to-use rule ('use this only once the user wants to swap') and an explicit alternative for the other case ('`get_quote` to check a price'). The rationale for the split (order creation screens addresses) makes the boundary actionable rather than arbitrary.

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