Skip to main content
Glama

qmax

Build the unsigned transactions for a trade

qmax_build_plan
Read-onlyIdempotent

Quotes an order and returns the exact transactions a wallet must sign to carry it out, in order. QMax signs nothing and sends nothing: you (or the user) sign each step with your own wallet and broadcast it.

Steps (in order): any share-management move needed first (selling shares that the other market manages), then one call per market. Each step: kind, description, destination (a smart contract by index), inputType (procedure number), amountQu to attach (QU that may leave the wallet; unused QU is refunded by the contracts) and payloadBase64 (the call's input bytes). 'maxOutlayQu' is the most QU that can leave the wallet across all steps, so check it against your own spending limit BEFORE signing. Sending a step moves real funds.

For a sell, pass how many shares the wallet holds under QX management and under QSwap management (holdings_qx, holdings_qswap) so the right moves are planned. Buys need no holdings.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
qtyYes
sideYes
assetYesAsset symbol, for example CFB or QDOGE (case does not matter). Use qmax_list_assets to find one.
holdings_qxNoSelling only: units of this asset the wallet holds that QX manages
slippage_bpsNo
holdings_qswapNoSelling only: units of this asset the wallet holds that QSwap manages

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.4/5.0
Behavior5/5

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

Annotations already declare readOnly/idempotent/non-destructive, and the description adds substantial behavioral context beyond them: the tool signs nothing and sends nothing, steps must be signed and broadcast by the caller, unused QU is refunded, maxOutlayQu caps total outlay, and signing a step moves real funds. This is exactly the extra context the schema and annotations cannot provide.

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-loads the core purpose in the first sentence, then organizes step detail and the spending-limit warning in a readable sequence. It is fairly long, but nearly every sentence carries distinct information; only minor phrasing could be tightened.

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 carries the full burden of explaining return values, and it does so in detail: kind, description, destination, inputType, amountQu (with refund semantics), payloadBase64, and maxOutlayQu. Combined with the step ordering and signing model, an agent has everything needed to invoke and consume the result correctly.

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 coverage is 50%, so the schema documents asset and holdings_qx/holdings_qswap. The description clarifies that holdings parameters are sell-only and drive step planning, adding real meaning. However slippage_bps and qty remain undocumented in both places, so it does not fully compensate for the coverage gap.

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: it quotes an order and returns the exact unsigned transactions a wallet must sign, in order. It also draws a clear line against sibling quote tools by emphasizing that QMax signs nothing and sends nothing. An agent can tell this is a transaction-planning tool, not a price-quote tool.

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

Usage Guidelines4/5

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

Gives concrete usage conditions: pass holdings_qx/holdings_qswap for sells, buys need no holdings, and check maxOutlayQu against a spending limit BEFORE signing. It lacks an explicit 'use this instead of qmax_get_quote / qmax_swap_quote when...' routing statement, so it's clear context without full alternative guidance.

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.