Skip to main content
Glama

Preview a market-order sweep without reserving liquidity — estimated fill, avg/worst price, partial-fill flag. Buys size by total spend, or by pre-fee notional

problee_estimate_market_order
Read-onlyIdempotent

Price a market order before placing it: estimated shares/amount, amount-weighted average price, worst-leg price, and a partial-fill flag, from the exact matching math a live order will meet. Reserves no maker liquidity and costs no gas, so call it as often as sizing requires. Read-only; no wallet proof required. SIZING A BUY — a bare amount is a ceiling on the TOTAL debited (base + taker fee together fit inside it), which is NOT what the same field means at Polymarket; pass amountMode "notional" for their meaning (pre-fee notional, fee charged on top), or maxSpend to state the ceiling explicitly. The response echoes amountMode, so read it rather than assuming. MINIMUMS — ONE floor. The venue's trading minimum is FLAT: one number, the same at every price, on either outcome, on every orderbook market, binding the amount you sent in the mode you sent it; a size under it answers 400 AMOUNT_BELOW_MINIMUM with minAmountWei, and the book snapshot publishes it as effectiveMinBuyAmount so you can size before asking. Each market still reports a minBuyAmount on that snapshot, but it is DEPRECATED AND UNENFORCED: settlement asserted it per settlement leg — the counterparty's leg of a complementary mint included, which made the felt minimum rise with the price — until the 2026-08-31 beacon upgrade removed the assertion across the whole catalog. Do not size against it and do not treat it as a floor. A market order is an immediate-or-cancel order — place it with problee_place_limit_order using timeInForce IOC and a price beyond the worst level this sweep touches. When this MCP session has a bound wallet, that address is excluded for self-trade prevention (matching REST sweep-estimate); with no wallet bound the estimate uses the zero address and may include your own resting orders, so treat it as optimistic.

Input Schema

NameRequiredDescriptionDefault
kindNo0=buy/bid, 1=sell/ask
sideYes0=outcome 1, 1=outcome 2
amountNoExact-input raw size in the market collateral's denomination. BUY: read as a TOTAL-SPEND CEILING by default — base + taker fee together land at or under this, so a typed 10 debits 10.000000 and never 10.03. Send amountMode "notional" to read it Polymarket-style instead: pre-fee notional, with the fee charged ON TOP (total debited = amount + fee). The venue's flat trading minimum binds THIS number as sent, in whichever mode you sent it, and is the same figure either way. SELL: collateral-denominated outcome-token units to sell; neither mode applies. Mutually exclusive with maxSpend — provide exactly one.
chainIdNoChain id for the market address. Required when the same market address exists on multiple chains.
maxSpendNoBUY only. Cap the TOTAL debited — base plus taker fee — at this raw collateral amount; the sweep sizes down so the complete cost fits. Identical in meaning to a bare `amount`, spelled out: send this when the cap is the point and you want the request to say so rather than rely on a default. Mutually exclusive with `amount`, and refused together with amountMode "notional" (which asks for the opposite).
amountModeNoBUY only. How to read the size. "total" (DEFAULT, and what every caller has always got) treats it as a ceiling on the total debited: base + taker fee ≤ amount. "notional" is Polymarket's `amount` meaning: buy this much of base and charge the fee on top, so the total debited is amount + fee and exceeds what you sent. The venue's flat trading minimum is the SAME NUMBER in both modes and binds the amount as sent — ten means ten debited under "total" and ten of pre-fee base under "notional" — so a wallet holding exactly the minimum can always send it. It is the only sizing floor: the market's stored minBuyAmount was retired as a settlement precondition in the 2026-08-31 beacon upgrade and refuses nothing. Any refusal bound comes back in the mode you sent, tagged with it. Refused on a sell, and refused alongside maxSpend.
limitPriceNoWorst requested-side executable price: BUY maximum, SELL minimum.
marketAddressYesOrderbook market address

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.8/5.0
Behavior5/5

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

Beyond the read-only annotations, the description discloses that no maker liquidity is reserved, no gas is spent, no wallet proof is required, and self-trade exclusion depends on whether a wallet is bound. It also explains the minimum-size failure behavior and the IOC relationship to live placement.

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?

The description is front-loaded and uses clear section labels for sizing, minimums, and execution behavior. It is longer than necessary because the minimum/deprecated-field history and amount-mode semantics are repeated across the description and 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?

Given a high-complexity pricing tool, complete schema descriptions, rich annotations, and an output schema, the description covers the remaining agent-relevant behavior: liquidity/gas cost, wallet-dependent self-trade behavior, minimum-size outcomes, and placement handoff. Nothing critical for correct invocation appears 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?

The schema already documents amount, maxSpend, amountMode, limitPrice, and minimums at 100% coverage, so the description is largely reinforcing schema semantics. It still adds useful cross-field interpretation, notably the Polymarket meaning mismatch and the instruction to read the echoed amountMode rather than assume it.

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?

The description gives a specific verb and resource — price an order before placing it — and enumerates the outputs: estimated shares/amount, average price, worst-leg price, and partial-fill flag. It also distinguishes this preview from the live placement path by naming problee_place_limit_order.

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?

It explicitly says to call this before placing a market order and as often as sizing requires, and it names the alternative execution path (problee_place_limit_order with IOC). It also states the no-wallet self-trade caveat that changes how the estimate should be interpreted.

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.